Moving to uv #994
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: [pull_request] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 12 | |
| matrix: | |
| python-version: ['3.9', '3.10', '3.11', '3.12'] | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up uv | |
| id: setup-uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| python-version: ${{ matrix.python-version }} | |
| cache-dependency-glob: "**/pyproject.toml" | |
| cache-suffix: "uv-${{ matrix.python-version }}-${{ matrix.os }}" | |
| - name: Install dependencies (macOS) | |
| if: matrix.os == 'macos-latest' | |
| run: | | |
| uv sync --extra test | |
| - name: Install dependencies (Windows) | |
| if: matrix.os == 'windows-latest' | |
| run: | | |
| uv sync --extra test --extra extras | |
| - name: Install dependencies (Linux) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| uv sync --extra test --extra extras | |
| - name: Disable numba JIT for codecov to include jitted methods | |
| if: (matrix.python-version == 3.9) && (matrix.os == 'ubuntu-latest') | |
| run: | | |
| echo "NUMBA_DISABLE_JIT=1" >> $GITHUB_ENV | |
| - name: Running tests | |
| run: uv run pytest --cov=. --cov-report=xml --color=yes | |
| - name: Upload coverage to Codecov | |
| if: (matrix.python-version == 3.12) && (matrix.os == 'ubuntu-latest') | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| file: ./coverage.xml | |
| flags: unittests | |
| name: codecov-umbrella |