From e563730823999d4a1ef4c06d07ab1220f2966a28 Mon Sep 17 00:00:00 2001 From: Will Dean Date: Tue, 25 Mar 2025 07:13:10 +0100 Subject: [PATCH 1/7] split tests by the current folders --- .github/workflows/test.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ca07d9f1..c1db770d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,7 +21,10 @@ jobs: os: [ubuntu-latest] python-version: ["3.10"] test-subset: - - tests + - tests/model + - tests/statespace + - tests/distributions + - tests --ignore tests/model --ignore tests/statespace --ignore tests/distributions fail-fast: false runs-on: ${{ matrix.os }} env: @@ -59,7 +62,10 @@ jobs: os: [windows-latest] python-version: ["3.12"] test-subset: - - tests + - tests/model + - tests/statespace + - tests/distributions + - tests --ignore tests/model --ignore tests/statespace --ignore tests/distributions fail-fast: false runs-on: ${{ matrix.os }} env: From d9964dee8d9bef870af12d3d44023f768e613aa6 Mon Sep 17 00:00:00 2001 From: Will Dean Date: Tue, 25 Mar 2025 07:22:51 +0100 Subject: [PATCH 2/7] run pre-commit on file --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c1db770d..50a309e5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,7 @@ jobs: - tests/model - tests/statespace - tests/distributions - - tests --ignore tests/model --ignore tests/statespace --ignore tests/distributions + - tests --ignore tests/model --ignore tests/statespace --ignore tests/distributions fail-fast: false runs-on: ${{ matrix.os }} env: @@ -65,7 +65,7 @@ jobs: - tests/model - tests/statespace - tests/distributions - - tests --ignore tests/model --ignore tests/statespace --ignore tests/distributions + - tests --ignore tests/model --ignore tests/statespace --ignore tests/distributions fail-fast: false runs-on: ${{ matrix.os }} env: From f6ec343e81ddbb0a73ba4276bfaca6bc9f133795 Mon Sep 17 00:00:00 2001 From: Will Dean Date: Tue, 25 Mar 2025 07:53:26 +0100 Subject: [PATCH 3/7] breakdown the statespace tests --- .github/workflows/test.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 50a309e5..d8d28a13 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,9 @@ jobs: python-version: ["3.10"] test-subset: - tests/model - - tests/statespace + - tests/statespace/test_statespace.py + - tests/statespace/test_kalman_filter.py + - tests/statespace --ignore tests/state_space/test_statespace.py --ignore tests/state_space/test_kalman_filter.py - tests/distributions - tests --ignore tests/model --ignore tests/statespace --ignore tests/distributions fail-fast: false @@ -63,7 +65,9 @@ jobs: python-version: ["3.12"] test-subset: - tests/model - - tests/statespace + - tests/statespace/test_statespace.py + - tests/statespace/test_kalman_filter.py + - tests/statespace --ignore tests/state_space/test_statespace.py --ignore tests/state_space/test_kalman_filter.py - tests/distributions - tests --ignore tests/model --ignore tests/statespace --ignore tests/distributions fail-fast: false From 5a4ccc719f43b0dbfd84c1d8aa41209c58db8085 Mon Sep 17 00:00:00 2001 From: Will Dean Date: Tue, 25 Mar 2025 07:54:22 +0100 Subject: [PATCH 4/7] add color to output --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d8d28a13..8a81dd56 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,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: @@ -97,7 +97,7 @@ 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: From 3db63dac0b44031f8850674273a6983f7da49f0c Mon Sep 17 00:00:00 2001 From: Will Dean Date: Tue, 25 Mar 2025 08:23:38 +0100 Subject: [PATCH 5/7] Remove the underscore in filename --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8a81dd56..9d53a3b3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,7 @@ jobs: - tests/model - tests/statespace/test_statespace.py - tests/statespace/test_kalman_filter.py - - tests/statespace --ignore tests/state_space/test_statespace.py --ignore tests/state_space/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 @@ -67,7 +67,7 @@ jobs: - tests/model - tests/statespace/test_statespace.py - tests/statespace/test_kalman_filter.py - - tests/statespace --ignore tests/state_space/test_statespace.py --ignore tests/state_space/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 From 48c851caa2e84579911d142f06e32335bc3f13bb Mon Sep 17 00:00:00 2001 From: Will Dean Date: Wed, 26 Mar 2025 11:48:10 +0100 Subject: [PATCH 6/7] add a dependent failure --- .github/workflows/test.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9d53a3b3..0aa2fbeb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -104,3 +104,12 @@ jobs: 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 build matrix status + if: ${{ needs.ubuntu.result != 'success' || needs.windows.result != 'success' }} + run: exit 1 From caa9142535045f915322653e4f506bdbbb7456bc Mon Sep 17 00:00:00 2001 From: Will Dean Date: Thu, 27 Mar 2025 13:29:16 +0100 Subject: [PATCH 7/7] change the name --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0aa2fbeb..f1909738 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -110,6 +110,6 @@ jobs: runs-on: ubuntu-latest needs: [ ubuntu, windows ] steps: - - name: Check build matrix status + - name: Check all tests pass if: ${{ needs.ubuntu.result != 'success' || needs.windows.result != 'success' }} run: exit 1