Skip to content

Commit ab5396c

Browse files
author
root
committed
Fix CI: Ensure pip installation and jose dependency
1 parent f797f0a commit ab5396c

File tree

1 file changed

+24
-54
lines changed

1 file changed

+24
-54
lines changed

.github/workflows/shared.yml

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

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

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

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

17-
- name: Install the project
18-
run: uv sync --frozen --all-extras --dev --python 3.12
18+
- name: Ensure pip is installed
19+
run: |
20+
uv run --no-sync python -m ensurepip --upgrade
1921
20-
- name: Run ruff format check
21-
run: uv run --no-sync ruff check .
22+
- name: Upgrade pip
23+
run: |
24+
uv run --no-sync python -m pip install --upgrade pip
2225
23-
typecheck:
24-
runs-on: ubuntu-latest
25-
steps:
26-
- uses: actions/checkout@v4
26+
- name: Install jose dependencies
27+
run: |
28+
uv run --no-sync python -m pip install python-jose types-python-jose
2729
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.12
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
54-
run: uv sync --frozen --all-extras --dev --python ${{ matrix.python-version }}
55-
56-
- name: Activate environment and install jose
57-
run: |
58-
uv run --no-sync python -m pip install python-jose types-python-jose
59-
60-
- name: Run pytest
61-
run: uv run --no-sync pytest
30+
- name: Run pytest
31+
run: uv run --no-sync pytest
6232

0 commit comments

Comments
 (0)