-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (63 loc) · 2.07 KB
/
check.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: check
on: push
jobs:
check:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- python-version: "3.9"
usable-python-version: "3.9"
- python-version: "3.10"
usable-python-version: "3.10"
- python-version: "3.11"
usable-python-version: "3.11"
- python-version: "3.12"
usable-python-version: "3.12"
- python-version: "3.13"
usable-python-version: "3.13"
env:
# Configure a constant location for the uv cache
UV_CACHE_DIR: /tmp/.uv-cache
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Restore px cache
uses: actions/cache@v4
with:
path: ./.pyprojectx
key: uv-${{ runner.os }}-${{ hashFiles('pw.lock') }}
restore-keys: |
uv-${{ runner.os }}-${{ hashFiles('pw.lock') }}
uv-${{ runner.os }}
- name: Restore uv cache
uses: actions/cache@v4
with:
path: /tmp/.uv-cache
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
restore-keys: |
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
uv-${{ runner.os }}
- name: Install the project
run: ./pw install
- name: Run tests
run: ./pw uv run pytest tests
- name: typecheck
run: ./pw uv run mypy
- name: lint
run: ./pw uv run ruff check --output-format github
- name: lint
run: ./pw uv run ruff format --check --diff
- name: set minimum deps
if: ${{ matrix.python-version }} != "3.13" # no wheels
run: ./pw uv pip install pydantic==2.4.2
- name: Run tests
if: ${{ matrix.python-version }} != "3.13" # no wheels
run: ./pw uv run pytest tests
- name: typecheck
if: ${{ matrix.python-version }} != "3.13" # no wheels
run: ./pw uv run mypy
- name: Minimize uv cache
run: ./pw uv cache prune --ci