Merge pull request #5 from A5rocks/modernize #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| tests: | |
| name: ${{ matrix.platform }}/${{ matrix.python }} tests | |
| runs-on: ${{ matrix.platform }}-latest | |
| timeout-minutes: 5 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python: ["3.9", "3.10", "3.11", "3.12", "3.13", "pypy-3.10"] | |
| platform: ["windows", "ubuntu", "macos"] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| allow-prereleases: true | |
| - run: pip install uv nox | |
| - run: nox -s test | |
| # TODO: combine coverage | |
| - name: upload coverage | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-data-${{ matrix.platform }}-${{ matrix.python }} | |
| path: .coverage.* | |
| include-hidden-files: true | |
| if-no-files-found: ignore | |
| coverage: | |
| name: combine and check coverage | |
| if: always() | |
| needs: tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: coverage-data-* | |
| merge-multiple: true | |
| - run: | | |
| pip install -r test-requirements.txt | |
| coverage combine | |
| coverage report --format=markdown >> $GITHUB_STEP_SUMMARY | |
| coverage report --fail-under=0 | |
| lint: | |
| name: lint | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.13 | |
| - uses: pre-commit/[email protected] | |
| - uses: pre-commit-ci/[email protected] | |
| if: always() |