Fix CI #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Test" | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- "main" | |
jobs: | |
test: | |
name: Test building latest pyright version | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: 1.8.3 | |
- name: Install dev dependencies | |
run: poetry install | |
- name: Build the latest Pyright version | |
run: poetry run python scripts/build_pyright.py latest | |
- name: Build the wheel | |
run: poetry build --format wheel | |
- name: Print latest built wheel | |
run: ls -AU dist/ | head -1 | |
- name: Install the wheel in the tests directory | |
run: | | |
poetry init --quiet --name test_wheel --directory tests/ \ | |
&& poetry add --editable ../dist/$(ls -AU dist/ | head -1) --directory tests/ | |
- name: Test successful typecheck | |
run: | | |
poetry run --directory test_wheel/ pyright -- tests/success.py | grep "0 error, 0 warnings, 0 informations" | |
- name: Test erroneous typecheck | |
run: | | |
poetry run --directory test_wheel/ pyright -- tests/error.py | grep "1 error, 0 warnings, 0 informations" | |