Skip to content
This repository was archived by the owner on Jun 9, 2025. It is now read-only.

Commit 6b3abc9

Browse files
committed
Use pyright in workflow
1 parent d90adcc commit 6b3abc9

File tree

1 file changed

+32
-4
lines changed

1 file changed

+32
-4
lines changed

.github/workflows/code-quality.yml

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,38 @@ on:
99
- '**'
1010

1111
jobs:
12-
check-formatting:
13-
name: Check code/doc formatting
12+
check:
13+
name: Check code formatting, typecheck the code
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v3
17-
- uses: actions/setup-python@v4
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-python@v5
18+
19+
- name: Install poetry
20+
shell: bash
21+
run: |
22+
python -m pip install poetry
23+
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
24+
25+
- name: Configure poetry
26+
shell: bash
27+
run: poetry config virtualenvs.in-project true
28+
29+
- name: Set up cache
30+
uses: actions/cache@v3
31+
id: cache
32+
with:
33+
path: .venv
34+
key: venv-quality-${{ hashFiles('**/poetry.lock') }}
35+
36+
- name: Ensure cache is healthy
37+
if: steps.cache.outputs.cache-hit == 'true'
38+
shell: bash
39+
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
40+
41+
- name: Install dependencies
42+
shell: bash
43+
run: poetry install
44+
1845
- uses: pre-commit/[email protected]
46+
- uses: jakebailey/pyright-action@v2

0 commit comments

Comments
 (0)