Skip to content

Commit

Permalink
move pyright outside tests to fail faster.
Browse files Browse the repository at this point in the history
  • Loading branch information
janfb committed Mar 6, 2024
1 parent 6dc604e commit cfd5849
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,26 @@ jobs:
with:
extra_args: --all-files

pyright:
name: type checking
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
# NOTE: We pin the version of pyright to match pyproject.toml.
- run: pip install pyright==1.1.305
- run: pyright sbi

test:
name: Tests
name: tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
torch-version: ["1.11", "2.0"]
python-version: ["3.9"]
torch-version: ["1.11, 2.0"]

steps:
- uses: actions/checkout@v4
Expand All @@ -41,11 +53,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install torch==${{ matrix.torch-version }} --extra-index-url https://download.pytorch.org/whl/cpu
pip install -e .[dev]
- name: Check types with pyright
run: |
pyright sbi
pip install .
- name: Test with pytest
run: |
Expand Down

0 comments on commit cfd5849

Please sign in to comment.