Skip to content

Commit 4bb4f72

Browse files
author
root
committed
Upgrade CI: Use Python 3.13 and latest package management practices
1 parent ab5396c commit 4bb4f72

File tree

1 file changed

+63
-24
lines changed

1 file changed

+63
-24
lines changed

.github/workflows/shared.yml

Lines changed: 63 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,71 @@
1-
test:
2-
runs-on: ubuntu-latest
3-
strategy:
4-
matrix:
5-
python-version: ["3.10", "3.11", "3.12", "3.13"]
1+
name: Shared Checks
62

7-
steps:
8-
- uses: actions/checkout@v4
3+
on:
4+
workflow_call:
95

10-
- name: Install uv
11-
uses: astral-sh/setup-uv@v3
12-
with:
13-
enable-cache: true
6+
jobs:
7+
format:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
1411

15-
- name: Install the project with the correct Python version
16-
run: uv sync --frozen --all-extras --dev --python ${{ matrix.python-version }}
12+
- name: Install uv
13+
uses: astral-sh/setup-uv@v3
14+
with:
15+
enable-cache: true
1716

18-
- name: Ensure pip is installed
19-
run: |
20-
uv run --no-sync python -m ensurepip --upgrade
17+
- name: Install the project
18+
run: uv sync --frozen --all-extras --dev --python 3.13
2119

22-
- name: Upgrade pip
23-
run: |
24-
uv run --no-sync python -m pip install --upgrade pip
20+
- name: Run ruff format check
21+
run: uv run --no-sync ruff check .
2522

26-
- name: Install jose dependencies
27-
run: |
28-
uv run --no-sync python -m pip install python-jose types-python-jose
23+
typecheck:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- name: Install uv
29+
uses: astral-sh/setup-uv@v3
30+
with:
31+
enable-cache: true
32+
33+
- name: Install the project
34+
run: uv sync --frozen --all-extras --dev --python 3.13
35+
36+
- name: Run pyright
37+
run: uv run --no-sync pyright
38+
39+
test:
40+
runs-on: ubuntu-latest
41+
strategy:
42+
matrix:
43+
python-version: ["3.10", "3.11", "3.12", "3.13"]
44+
45+
steps:
46+
- uses: actions/checkout@v4
47+
48+
- name: Install uv
49+
uses: astral-sh/setup-uv@v3
50+
with:
51+
enable-cache: true
52+
53+
- name: Install the project with the correct Python version
54+
run: uv sync --frozen --all-extras --dev --python ${{ matrix.python-version }}
55+
56+
- name: Ensure pip is installed and upgraded
57+
run: |
58+
uv run --no-sync python -m ensurepip --upgrade
59+
uv run --no-sync python -m pip install --upgrade pip
60+
61+
- name: Install jose dependencies
62+
run: |
63+
uv run --no-sync python -m pip install python-jose types-python-jose
64+
65+
- name: Verify installation
66+
run: uv run --no-sync python -m pip list
67+
68+
- name: Run pytest
69+
run: uv run --no-sync pytest
2970

30-
- name: Run pytest
31-
run: uv run --no-sync pytest
3271

0 commit comments

Comments
 (0)