Skip to content

Split test suite by folder #439

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 23 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ jobs:
os: [ubuntu-latest]
python-version: ["3.10"]
test-subset:
- tests
- tests/model
- tests/statespace/test_statespace.py
- tests/statespace/test_kalman_filter.py
- tests/statespace --ignore tests/statespace/test_statespace.py --ignore tests/statespace/test_kalman_filter.py
- tests/distributions
- tests --ignore tests/model --ignore tests/statespace --ignore tests/distributions
fail-fast: false
runs-on: ${{ matrix.os }}
env:
Expand All @@ -46,7 +51,7 @@ jobs:
python --version
- name: Run tests
run: |
python -m pytest -vv --cov=pymc_extras --cov-append --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET
python -m pytest --color=yes -vv --cov=pymc_extras --cov-append --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
Expand All @@ -59,7 +64,12 @@ jobs:
os: [windows-latest]
python-version: ["3.12"]
test-subset:
- tests
- tests/model
- tests/statespace/test_statespace.py
- tests/statespace/test_kalman_filter.py
- tests/statespace --ignore tests/statespace/test_statespace.py --ignore tests/statespace/test_kalman_filter.py
- tests/distributions
- tests --ignore tests/model --ignore tests/statespace --ignore tests/distributions
fail-fast: false
runs-on: ${{ matrix.os }}
env:
Expand Down Expand Up @@ -87,10 +97,19 @@ jobs:
# This job uses a cmd shell, therefore the environment variable syntax is different!
# The ">-" in the next line replaces newlines with spaces (see https://stackoverflow.com/a/66809682).
run: >-
python -m pytest -vv --cov=pymc_extras --cov-append --cov-report=xml --cov-report term --durations=50 %TEST_SUBSET%
python -m pytest --color=yes -vv --cov=pymc_extras --cov-append --cov-report=xml --cov-report term --durations=50 %TEST_SUBSET%
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
env_vars: TEST_SUBSET
name: ${{ matrix.os }}
fail_ci_if_error: false

all_tests:
if: ${{ always() }}
runs-on: ubuntu-latest
needs: [ ubuntu, windows ]
steps:
- name: Check all tests pass
if: ${{ needs.ubuntu.result != 'success' || needs.windows.result != 'success' }}
run: exit 1