Revisit GitHub Actions #26
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: Python Client - CI | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| permissions: | |
| contents: read | |
| # Opt into Node.js 24 runtime for all JavaScript actions. | |
| # Remove once actions/checkout, actions/setup-python and codecov-action | |
| # ship native Node.js 24 releases (currently scheduled for June 2026). | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true' | |
| jobs: | |
| test: | |
| name: "Test · Python ${{ matrix.python-version }}" | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: "Set up Python ${{ matrix.python-version }}" | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| - name: Install dependencies | |
| run: pip install -e ".[dev]" | |
| - name: Type-check (mypy) | |
| run: mypy | |
| - name: Test with pytest | |
| run: pytest --cov-report=xml | |
| - name: Upload coverage to Codecov | |
| if: matrix.python-version == '3.14' | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: coverage.xml | |
| fail_ci_if_error: false | |
| build: | |
| name: "Verify build" | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.14" | |
| cache: pip | |
| - name: Install build tools | |
| run: pip install build twine | |
| - name: Build distribution | |
| run: python -m build | |
| - name: Check distribution metadata | |
| run: twine check dist/* |