Skip to content

Commit 42fa035

Browse files
authored
Automatically run slow tests when main is involved. (#438)
In addition, this PR limits the slow test to Windows and Python 3.10. The choices are somewhat arbitrary, my thought was to test the setup not covered as much through use by the devs.
1 parent 7ea287f commit 42fa035

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/tests.yaml

+5-2
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,11 @@ jobs:
7373
pytest -x -m "not slow"
7474
7575
- name: Run Slow Tests
76-
# run all slow tests only on manual trigger
77-
if: github.event_name == 'workflow_dispatch'
76+
# Run slow tests on manual trigger and pushes/PRs to main.
77+
# Limit to one OS and Python version to save compute.
78+
# Multiline if statements are weird, https://github.com/orgs/community/discussions/25641,
79+
# but feel free to convert it.
80+
if: ${{ ((github.event_name == 'workflow_dispatch') || (github.event_name == 'push' && github.ref_name == 'main') || (github.event_name == 'pull_request' && github.base_ref == 'main')) && ((matrix.os == 'windows-latest') && (matrix.python-version == '3.10')) }}
7881
run: |
7982
pytest -m "slow"
8083

0 commit comments

Comments
 (0)