Skip to content

Commit

Permalink
Merge pull request #208 from pyt-team/ninamiolane-speed-tests
Browse files Browse the repository at this point in the history
Speed CI workflow: Divide tests into testing the codebase and testing the tutorials
  • Loading branch information
ninamiolane authored Sep 19, 2023
2 parents 6390aae + 34e24cb commit de06c7c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ jobs:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
fail-fast: true
matrix:
os: [ubuntu-latest]
python-version: ["3.10", "3.11"]
torch-version: [2.0.1]
include:
- torch-version: 2.0.1
test-scope: ["codebase", "tutorials"]

steps:
- uses: actions/checkout@v3
Expand All @@ -57,10 +58,16 @@ jobs:
- name: Typecheck [mypy]
run: |
mypy -p topomodelx
- name: Run tests [pytest]
- name: Run tests for codebase [pytest]
if : ${{matrix.test-scope == 'codebase'}}
run: |
pytest --cov --cov-report=xml:coverage.xml
pytest --cov --cov-report=xml:coverage.xml test/nn test/base test/utils
- name: Run tests for tutorials [pytest]
if : ${{matrix.test-scope == 'tutorials'}}
run: |
pytest test/test_tutorials.py
- name: Upload coverage
if : ${{matrix.test-scope == 'codebase'}}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down

0 comments on commit de06c7c

Please sign in to comment.