|
7 | 7 | strategy: |
8 | 8 | fail-fast: false |
9 | 9 | matrix: |
10 | | - python-version: ["3.10", "3.11", "3.12"] |
| 10 | + python-version: ["3.11", "3.12", "3.13"] |
11 | 11 | steps: |
12 | | - - uses: actions/checkout@v4 |
| 12 | + - uses: actions/checkout@v6 |
13 | 13 |
|
14 | | - - name: Set up Python ${{ matrix.python-version }} |
15 | | - uses: actions/setup-python@v5 |
| 14 | + - name: Set up Python |
| 15 | + uses: actions/setup-python@v6 |
| 16 | + with: |
| 17 | + python-version: {{ "${{ matrix.python-version }}" }} |
| 18 | + |
| 19 | + - name: Install uv |
| 20 | + uses: astral-sh/setup-uv@v7 |
16 | 21 | with: |
17 | | - python-version: ${{ matrix.python-version }} |
| 22 | + enable-cache: true |
18 | 23 |
|
19 | 24 | - name: Install dependencies |
20 | | - run: | |
21 | | - python3 -m pip install pipenv |
22 | | - pipenv install --dev |
| 25 | + run: uv sync |
23 | 26 | lint: |
24 | 27 | runs-on: ubuntu-latest |
25 | 28 | steps: |
26 | | - - uses: actions/checkout@v4 |
| 29 | + - uses: actions/checkout@v6 |
27 | 30 |
|
28 | 31 | - name: Set up Python |
29 | | - uses: actions/setup-python@v5 |
| 32 | + uses: actions/setup-python@v6 |
30 | 33 | with: |
31 | | - python-version: 3.11 |
| 34 | + python-version: 3.13 |
| 35 | + |
| 36 | + - name: Install uv |
| 37 | + uses: astral-sh/setup-uv@v7 |
| 38 | + with: |
| 39 | + enable-cache: true |
32 | 40 |
|
33 | 41 | - name: Install dependencies |
34 | | - run: python3 -m pip install ".[dev]" |
| 42 | + run: uv sync --extra dev |
35 | 43 |
|
36 | 44 | - name: Check style |
37 | | - run: python3 -m ruff check . && python3 -m ruff format --check . |
| 45 | + run: uv run ruff check && uv run ruff format --check |
| 46 | + |
| 47 | + precommit_hooks: |
| 48 | + runs-on: ubuntu-latest |
| 49 | + steps: |
| 50 | + - uses: actions/checkout@v6 |
| 51 | + |
| 52 | + - uses: j178/prek-action@v1 |
| 53 | + with: |
| 54 | + extra_args: '--all-files --skip "ruff-format" --skip "ruff-check"' |
38 | 55 |
|
39 | 56 | docs: |
40 | 57 | runs-on: ubuntu-latest |
41 | 58 | env: |
42 | 59 | SPHINX_GITHUB_CHANGELOG_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
43 | 60 | steps: |
44 | | - - uses: actions/checkout@v4 |
| 61 | + - uses: actions/checkout@v6 |
45 | 62 |
|
46 | 63 | - name: Set up Python |
47 | | - uses: actions/setup-python@v5 |
| 64 | + uses: actions/setup-python@v6 |
48 | 65 | with: |
49 | | - python-version: 3.11 |
| 66 | + python-version: 3.12 # broken on 3.13 |
| 67 | + |
| 68 | + - name: Install uv |
| 69 | + uses: astral-sh/setup-uv@v7 |
| 70 | + with: |
| 71 | + enable-cache: true |
50 | 72 |
|
51 | 73 | - name: Install dependencies |
52 | | - run: | |
53 | | - python3 -m pip install --upgrade pip |
54 | | - python3 -m pip install '.[docs]' |
| 74 | + run: uv sync --extra docs |
55 | 75 |
|
56 | 76 | - name: Attempt docs build |
57 | 77 | working-directory: ./docs |
58 | | - run: make html |
59 | | - |
60 | | - precommit_hooks: |
61 | | - runs-on: ubuntu-latest |
62 | | - strategy: |
63 | | - matrix: |
64 | | - cmd: |
65 | | - - "end-of-file-fixer" |
66 | | - - "trailing-whitespace" |
67 | | - - "mixed-line-ending" |
68 | | - steps: |
69 | | - - uses: actions/checkout@v4 |
70 | | - |
71 | | - - name: Set up Python 3.12 |
72 | | - uses: actions/setup-python@v5 |
73 | | - with: |
74 | | - python-version: 3.12 |
75 | | - |
76 | | - - uses: pre-commit/[email protected] |
77 | | - with: |
78 | | - extra_args: ${{ matrix.cmd }} --all-files |
| 78 | + run: source ../.venv/bin/activate && make html |
0 commit comments