|
2 | 2 | # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
3 | 3 | name: "build"
|
4 | 4 |
|
5 |
| -on: [ push, pull_request ] |
| 5 | +on: [push, pull_request] |
6 | 6 |
|
7 | 7 | jobs:
|
8 | 8 | build:
|
9 | 9 | strategy:
|
10 | 10 | fail-fast: false
|
11 | 11 | matrix:
|
12 |
| - os: [ ubuntu-latest, macos-latest, windows-latest ] |
13 |
| - python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13" ] |
| 12 | + os: [ubuntu-latest, macos-latest, windows-latest] |
| 13 | + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] |
14 | 14 | runs-on: ${{ matrix.os }}
|
15 | 15 | steps:
|
16 |
| - - uses: actions/checkout@v4 # https://github.com/actions/checkout |
| 16 | + - uses: actions/checkout@v4 # https://github.com/actions/checkout |
17 | 17 | with:
|
18 | 18 | # Only a single commit is fetched by default, for the ref/SHA that triggered the workflow.
|
19 | 19 | # Set fetch-depth: 0 to fetch all history for all branches and tags.
|
20 | 20 | fetch-depth: 0 # Needed for setuptools_scm to work correctly
|
21 |
| - - uses: actions/setup-python@v5 # https://github.com/actions/setup-python |
| 21 | + - name: Install uv |
| 22 | + uses: astral-sh/setup-uv@v3 |
| 23 | + |
| 24 | + - name: Set up Python ${{ matrix.python-version }} |
| 25 | + uses: actions/setup-python@v5 |
22 | 26 | with:
|
23 | 27 | python-version: ${{ matrix.python-version }}
|
24 | 28 | allow-prereleases: true
|
25 |
| - - name: Install dependencies |
26 |
| - run: python -m pip install --upgrade pip setuptools setuptools-scm nox |
27 |
| - - name: Run tests and post coverage results |
28 |
| - env: |
29 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
30 |
| - run: python -m nox --non-interactive --session tests-${{ matrix.python-version }} # Run nox for a single version of Python |
| 29 | + |
| 30 | + - name: Install the project |
| 31 | + run: uv sync --all-extras --dev |
| 32 | + |
| 33 | + - name: Run tests |
| 34 | + run: uv run inv pytest --junit --no-pty --base |
| 35 | + |
| 36 | + - name: Run isolated tests |
| 37 | + run: uv run inv pytest --junit --no-pty --isolated |
0 commit comments