|
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"] |
2 | 6 |
|
3 | | -on: |
4 | | - workflow_call: |
| 7 | + steps: |
| 8 | + - uses: actions/checkout@v4 |
5 | 9 |
|
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 |
11 | 14 |
|
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 }} |
16 | 17 |
|
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 |
19 | 21 |
|
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 |
22 | 25 |
|
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 |
27 | 29 |
|
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 |
62 | 32 |
|
0 commit comments