|
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
|
| 19 | + |
| 20 | + - name: Install uv |
| 21 | + uses: astral-sh/setup-uv@v3 |
| 22 | + |
| 23 | + - name: Install the project |
| 24 | + run: uv sync --all-extras --dev |
| 25 | + |
24 | 26 | - name: Set up Python ${{ matrix.python-version }}
|
25 |
| - uses: actions/setup-python@v5 |
| 27 | + uses: actions/setup-python@v4 |
26 | 28 | with:
|
27 |
| - python-version: ${{ matrix.python-version }} |
28 |
| - - name: Install dependencies |
| 29 | + python-version: "3.13" |
| 30 | + |
| 31 | + - name: Install the project |
29 | 32 | 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 |
| 33 | + uv sync --all-extras --dev |
| 34 | + uv tool install pre-commit |
| 35 | + - name: Lint with ruff |
35 | 36 | run: |
|
36 |
| - pytest -v -s |
| 37 | + uvx pre-commit run -a |
37 | 38 |
|
38 |
| - lint: |
| 39 | + build: |
39 | 40 | runs-on: ubuntu-latest
|
| 41 | + strategy: |
| 42 | + fail-fast: false |
| 43 | + matrix: |
| 44 | + python-version: ["3.10", "3.13", "pypy-3.10"] |
| 45 | + |
40 | 46 | steps:
|
41 | 47 | - uses: actions/checkout@v4
|
42 | 48 | with:
|
43 | 49 | submodules: true
|
| 50 | + |
| 51 | + - name: Install uv |
| 52 | + uses: astral-sh/setup-uv@v3 |
| 53 | + |
44 | 54 | - name: Set up Python ${{ matrix.python-version }}
|
45 | 55 | uses: actions/setup-python@v5
|
46 | 56 | with:
|
47 |
| - python-version: "3.12" |
| 57 | + python-version: ${{ matrix.python-version }} |
| 58 | + |
| 59 | + - name: Install the project |
| 60 | + run: uv sync --all-extras --dev |
| 61 | + |
48 | 62 | - name: Install dependencies
|
49 | 63 | 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 |
| 64 | + uv tool install mypy |
| 65 | + uv tool install ruff |
| 66 | + - name: Run tests |
| 67 | + run: uv run pytest -v -s tests |
0 commit comments