Skip to content

Commit 58d1e49

Browse files
committed
Tie pyright version in GHA to pyright version in pre-commit
1 parent 296fe1b commit 58d1e49

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,26 @@ jobs:
7474

7575
- uses: actions/setup-python@v5
7676
with:
77-
python-version: '3.8' # Important for importlib_metadata
78-
cache: 'poetry'
77+
python-version: "3.8" # Important for importlib_metadata
78+
cache: "poetry"
7979

8080
- name: Install dependencies
8181
run: poetry install --all-extras --with=types
8282

8383
- name: Activate virtualenv
8484
run: echo "$(poetry env info --path)/bin" >> $GITHUB_PATH
8585

86+
- name: Extract pyright version from pre-commit
87+
id: pre-commit-pyright-version
88+
run: >
89+
yq '.repos
90+
| filter(.repo == "https://github.com/RobertCraigie/pyright-python").0.rev
91+
| "pyright-version="+sub("^v", "")'
92+
.pre-commit-config.yaml >> $GITHUB_OUTPUT
93+
8694
- uses: jakebailey/pyright-action@v2
95+
with:
96+
version: ${{ steps.pre-commit-pyright-version.outputs.pyright-version }}
8797

8898
report-status:
8999
name: success

0 commit comments

Comments
 (0)