| 1 | name: pull request |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: |
| 6 | - 'master' |
| 7 | tags: |
| 8 | - '**' |
| 9 | pull_request: |
| 10 | branches: |
| 11 | - '**' |
| 12 | |
| 13 | jobs: |
| 14 | tests: |
| 15 | strategy: |
| 16 | fail-fast: false |
| 17 | max-parallel: 4 |
| 18 | matrix: |
| 19 | platform: [ubuntu-latest, windows-latest] |
| 20 | python-version: |
| 21 | - "3.8" |
| 22 | - "3.9" |
| 23 | - "3.10" |
| 24 | - "3.11" |
| 25 | - "3.12" |
| 26 | include: |
| 27 | - python-version: "3.8" |
| 28 | tox-env: py38 |
| 29 | - python-version: "3.9" |
| 30 | tox-env: py39 |
| 31 | - python-version: "3.10" |
| 32 | tox-env: py310 |
| 33 | - python-version: "3.11" |
| 34 | tox-env: py311 |
| 35 | - python-version: "3.12" |
| 36 | tox-env: py312 |
| 37 | env: |
| 38 | TOXENV: ${{ matrix.tox-env }} |
| 39 | |
| 40 | runs-on: ${{ matrix.platform }} |
| 41 | |
| 42 | steps: |
| 43 | - uses: actions/checkout@v3 |
| 44 | - name: Set up Python ${{ matrix.python-version }} |
| 45 | if: "!endsWith(matrix.python-version, '-dev')" |
| 46 | uses: actions/setup-python@v4 |
| 47 | with: |
| 48 | python-version: ${{ matrix.python-version }} |
| 49 | allow-prereleases: true |
| 50 | - name: Set up development Python ${{ matrix.python-version }} |
| 51 | if: endsWith(matrix.python-version, '-dev') |
| 52 | uses: deadsnakes/[email protected] |
| 53 | with: |
| 54 | python-version: ${{ matrix.python-version }} |
| 55 | - name: Install dependencies |
| 56 | run: | |
| 57 | python -m pip install --upgrade pip setuptools tox build coverage |
| 58 | - name: Test |
| 59 | run: | |
| 60 | python -m tox |
| 61 | - name: Upload Results |
| 62 | if: success() |
| 63 | uses: codecov/codecov-action@v3 |
| 64 | with: |
| 65 | file: ./coverage.xml |
| 66 | flags: unittests |
| 67 | name: ${{ matrix.platform }}-${{ matrix.tox-env }} |
| 68 | fail_ci_if_error: false |
| 69 | |
| 70 | lint: |
| 71 | strategy: |
| 72 | max-parallel: 4 |
| 73 | matrix: |
| 74 | python-version: [3.11] |
| 75 | |
| 76 | env: |
| 77 | TOXENV: lint |
| 78 | |
| 79 | runs-on: ubuntu-latest |
| 80 | |
| 81 | steps: |
| 82 | - uses: actions/checkout@v3 |
| 83 | - name: Set up Python ${{ matrix.python-version }} |
| 84 | uses: actions/setup-python@v4 |
| 85 | with: |
| 86 | python-version: ${{ matrix.python-version }} |
| 87 | - name: Install dependencies |
| 88 | run: | |
| 89 | python -m pip install --upgrade pip setuptools build tox |
| 90 | - name: Lint |
| 91 | run: | |
| 92 | python -m tox |
| 93 | |
| 94 | documents: |
| 95 | strategy: |
| 96 | max-parallel: 4 |
| 97 | matrix: |
| 98 | python-version: [3.11] |
| 99 | |
| 100 | env: |
| 101 | TOXENV: documents |
| 102 | |
| 103 | runs-on: ubuntu-latest |
| 104 | |
| 105 | steps: |
| 106 | - uses: actions/checkout@v3 |
| 107 | - name: Set up Python ${{ matrix.python-version }} |
| 108 | uses: actions/setup-python@v4 |
| 109 | with: |
| 110 | python-version: ${{ matrix.python-version }} |
| 111 | - name: Install dependencies |
| 112 | run: | |
| 113 | python -m pip install --upgrade pip setuptools build tox |
| 114 | - name: Install Aspell |
| 115 | run: | |
| 116 | sudo apt-get install aspell aspell-en |
| 117 | - name: Build documents |
| 118 | run: | |
| 119 | python -m tox |