Nox and ci updates #686
Workflow file for this run
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: Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| env: | |
| FORCE_COLOR: "1" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| tests: | |
| timeout-minutes: 10 | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| pyv: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] | |
| session: ['tests'] | |
| include: | |
| - os: ubuntu-latest | |
| pyv: '3.9' | |
| session: 'tests-minversion' | |
| steps: | |
| - name: Check out the repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: hynek/setup-cached-uv@v2 | |
| - name: Run tests | |
| run: uvx nox --sessions ${{ matrix.session }} --python ${{ matrix.pyv }} -- --cov-report=xml | |
| typesafety: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| pyv: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] | |
| steps: | |
| - name: Check out the repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: hynek/setup-cached-uv@v2 | |
| - name: Run tests | |
| run: uvx nox --sessions type-safety --python ${{ matrix.pyv }} | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out the repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Upgrade pip and nox | |
| run: | | |
| python -m pip install --upgrade pip nox | |
| pip --version | |
| nox --version | |
| - name: Lint code and check dependencies | |
| run: nox -s lint | |
| build: | |
| needs: [tests, lint] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out the repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip nox | |
| pip --version | |
| nox --version | |
| - name: Build package | |
| run: nox -s build |