diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ca07d9f1..f1909738 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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: @@ -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: @@ -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: @@ -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