Skip to content

Commit 88dc0ae

Browse files
run all tests (including "slow") on push to main (#487)
* run all tests (including "slow") on push to main * move logic outside of run script and make two different steps * add ref check back --------- Co-authored-by: Danylo Mysak <[email protected]>
1 parent 6d5a064 commit 88dc0ae

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/tests.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,15 @@ jobs:
6363
with:
6464
os: ${{ matrix.os }}
6565
python: ${{ matrix.python }}
66-
- name: Run tests with coverage
66+
# If this is a push to the main branch, run all tests (including slow ones).
67+
- name: Run all tests with coverage
68+
if: github.event_name == 'push' && github.ref_name == 'main'
69+
run: |
70+
source .venv/bin/activate
71+
pytest --cov --cov-report=xml:coverage.xml --cov-report=term-missing --typeguard-packages=pytorch-ie
72+
# Otherwise skip slow tests
73+
- name: Run 'not slow' tests with coverage
74+
if: github.event_name != 'push' || github.ref_name != 'main'
6775
run: |
6876
source .venv/bin/activate
6977
pytest -m "not slow" --cov --cov-report=xml:coverage.xml --cov-report=term-missing --typeguard-packages=pytorch-ie

0 commit comments

Comments
 (0)