| 1 | name: Tests |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: [ main ] |
| 6 | pull_request: |
| 7 | branches: [ main ] |
| 8 | |
| 9 | jobs: |
| 10 | lint: |
| 11 | name: Lint |
| 12 | runs-on: ubuntu-latest |
| 13 | strategy: |
| 14 | matrix: |
| 15 | python-version: [ "3.12", "3.8" ] |
| 16 | steps: |
| 17 | - uses: actions/checkout@v2 |
| 18 | - name: Set up Python ${{ matrix.python-version }} |
| 19 | uses: actions/setup-python@v2 |
| 20 | with: |
| 21 | python-version: ${{ matrix.python-version }} |
| 22 | - name: Install dependencies |
| 23 | run: pip install tox tox-uv |
| 24 | - name: Check manifest |
| 25 | run: tox -e manifest |
| 26 | - name: Check code quality with flake8 |
| 27 | run: tox -e flake8 |
| 28 | - name: Check package metadata with Pyroma |
| 29 | run: tox -e pyroma |
| 30 | - name: Check static typing with MyPy |
| 31 | run: tox -e mypy |
| 32 | docs: |
| 33 | name: Documentation |
| 34 | runs-on: ubuntu-latest |
| 35 | strategy: |
| 36 | matrix: |
| 37 | python-version: [ "3.12", "3.8" ] |
| 38 | steps: |
| 39 | - uses: actions/checkout@v2 |
| 40 | - name: Set up Python ${{ matrix.python-version }} |
| 41 | uses: actions/setup-python@v2 |
| 42 | with: |
| 43 | python-version: ${{ matrix.python-version }} |
| 44 | - name: Install dependencies |
| 45 | run: pip install tox tox-uv |
| 46 | - name: Check RST conformity with doc8 |
| 47 | run: tox -e doc8 |
| 48 | - name: Check docstring coverage |
| 49 | run: tox -e docstr-coverage |
| 50 | - name: Check documentation build with Sphinx |
| 51 | run: tox -e docs-test |
| 52 | tests: |
| 53 | name: Tests |
| 54 | runs-on: ${{ matrix.os }} |
| 55 | strategy: |
| 56 | matrix: |
| 57 | os: [ ubuntu-latest, windows-latest, macos-latest ] |
| 58 | python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] |
| 59 | steps: |
| 60 | - uses: actions/checkout@v2 |
| 61 | - name: Set up Python ${{ matrix.python-version }} |
| 62 | uses: actions/setup-python@v2 |
| 63 | with: |
| 64 | python-version: ${{ matrix.python-version }} |
| 65 | - name: Install dependencies |
| 66 | run: pip install tox tox-uv |
| 67 | - name: Test with pytest |
| 68 | run: |
| 69 | tox -e py |
| 70 | - name: Build codecov file |
| 71 | if: success() |
| 72 | run: |
| 73 | tox -e coverage-xml |
| 74 | - name: Upload coverage report to codecov |
| 75 | uses: codecov/codecov-action@v1 |
| 76 | if: success() |
| 77 | with: |
| 78 | file: coverage.xml |