|
10 | 10 | branches: [master]
|
11 | 11 |
|
12 | 12 | jobs:
|
13 |
| - build: |
| 13 | + lint: |
14 | 14 | runs-on: ubuntu-latest
|
15 |
| - strategy: |
16 |
| - fail-fast: false |
17 |
| - matrix: |
18 |
| - python-version: ["3.10", "3.13", "pypy-3.10"] |
19 |
| - |
20 | 15 | steps:
|
21 |
| - - uses: actions/checkout@v4 |
| 16 | + - uses: actions/checkout@v3 |
22 | 17 | with:
|
23 | 18 | submodules: true
|
24 |
| - - name: Set up Python ${{ matrix.python-version }} |
| 19 | + |
| 20 | + - name: Install uv |
| 21 | + uses: astral-sh/setup-uv@v3 |
| 22 | + |
| 23 | + - name: Set up Python |
25 | 24 | uses: actions/setup-python@v5
|
26 | 25 | with:
|
27 |
| - python-version: ${{ matrix.python-version }} |
28 |
| - - name: Install dependencies |
| 26 | + python-version: "3.13" |
| 27 | + |
| 28 | + - name: Install the project |
29 | 29 | run: |
|
30 |
| - python -m pip install --upgrade pip |
31 |
| - python -m pip install pytest mypy ruff |
32 |
| - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi |
33 |
| - if [ -f dev_requirements.txt ]; then pip install -r dev_requirements.txt; fi |
34 |
| - - name: Test with pytest |
| 30 | + uv sync --all-extras --dev |
| 31 | + uv tool install pre-commit |
| 32 | + - name: Lint with ruff |
35 | 33 | run: |
|
36 |
| - pytest -v -s |
| 34 | + uvx pre-commit run -a |
37 | 35 |
|
38 |
| - lint: |
| 36 | + build: |
39 | 37 | runs-on: ubuntu-latest
|
| 38 | + needs: lint |
| 39 | + strategy: |
| 40 | + fail-fast: false |
| 41 | + matrix: |
| 42 | + python-version: ["3.10", "3.13", "pypy-3.10"] |
| 43 | + |
40 | 44 | steps:
|
41 | 45 | - uses: actions/checkout@v4
|
42 | 46 | with:
|
43 | 47 | submodules: true
|
| 48 | + |
| 49 | + - name: Install uv |
| 50 | + uses: astral-sh/setup-uv@v3 |
| 51 | + |
44 | 52 | - name: Set up Python ${{ matrix.python-version }}
|
45 | 53 | uses: actions/setup-python@v5
|
46 | 54 | with:
|
47 |
| - python-version: "3.12" |
| 55 | + python-version: ${{ matrix.python-version }} |
| 56 | + |
| 57 | + - name: Install the project |
| 58 | + run: uv sync --all-extras --dev |
| 59 | + |
48 | 60 | - name: Install dependencies
|
49 | 61 | run: |
|
50 |
| - python -m pip install --upgrade pip |
51 |
| - python -m pip install pre-commit |
52 |
| - - name: Lint with ruff |
53 |
| - run: | |
54 |
| - pre-commit run -a |
| 62 | + uv tool install mypy |
| 63 | + uv tool install ruff |
| 64 | + - name: Run tests |
| 65 | + run: uv run pytest -v -s tests |
0 commit comments