1- name : lint
1+ name : Type Coverage and Linting
22
33on :
44 push :
5+ branches :
6+ - main
57 pull_request :
6- types : [ opened, synchronize ]
8+ branches :
9+ - main
10+ types : [opened, reopened, synchronize]
711
812jobs :
9- ruff :
10- runs-on : ubuntu-latest
11- steps :
12- - uses : actions/checkout@v4
13- - uses : astral-sh/ruff-action@31a518504640beb4897d0b9f9e50a2a9196e75ba
14- with :
15- args : ' format --check'
16- - uses : astral-sh/ruff-action@31a518504640beb4897d0b9f9e50a2a9196e75ba
17- with :
18- args : ' check'
19-
2013 check :
2114 runs-on : ubuntu-latest
2215 strategy :
2316 fail-fast : false
2417 matrix :
25- python-version : [ '3.12' ]
18+ python-version : [ '3.12', '3.13', '3.14-dev' ]
2619
27- name : check ${{ matrix.python-version }}
20+ name : " Type Coverage and Linting @ ${{ matrix.python-version }}"
2821 steps :
29- - uses : actions/checkout@v4
22+ - name : " Checkout Repository"
23+ uses : actions/checkout@v4
3024 with :
3125 fetch-depth : 0
3226
33- - name : Set up Python ${{ matrix.python-version }}
34- uses : actions /setup-python@v2
27+ - name : Setup PDM @ ${{ matrix.python-version }}
28+ uses : pdm-project /setup-pdm@v4
3529 with :
3630 python-version : ${{ matrix.python-version }}
31+ cache : true
32+ allow-python-prereleases : true
3733
38- - name : Setup node.js
39- uses : actions/setup-node@v2
40- with :
41- node-version : ' 16'
42-
43- - name : Install pyright
34+ - name : Install deps @ ${{ matrix.python-version }}
4435 run : |
45- npm install -g pyright
36+ pdm install --check --no-editable
4637
47- - name : Run pyright
38+ - name : Activate venv @ ${{ matrix.python-version }}
4839 run : |
49- pyright
40+ echo "$(pdm info --where)/.venv/bin" >> $GITHUB_PATH
41+
42+ - name : " Run Pyright @ ${{ matrix.python-version }}"
43+ uses : jakebailey/pyright-action@v2
44+ with :
45+ warnings : false
46+
47+ - name : Lint check
48+ uses : astral-sh/ruff-action@v3
49+ with :
50+ args : check .
51+
52+ - name : Formatting check
53+ uses : astral-sh/ruff-action@v3
54+ with :
55+ args : format --check
5056
5157 - name : Verify No CLRF line endings.
5258 run : >
5359 ! $(find . ! -path "./.git/*" -not -type d -exec file "{}" ";" |& grep -q " CRLF ")
5460
5561 - name : Ensure runtime validity of annotations
56- run : |
57- python -m pip install .
58- python _misc/_ensure_annotations.py
62+ run : python _misc/_ensure_annotations.py
0 commit comments