From 00743181e874b84816a06ca2cbf0815925703635 Mon Sep 17 00:00:00 2001 From: cvanelteren Date: Sun, 1 Feb 2026 20:14:22 +1000 Subject: [PATCH 1/5] Add debug output for selected mpl tests --- .github/workflows/build-ultraplot.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build-ultraplot.yml b/.github/workflows/build-ultraplot.yml index 4130688d1..8010fc175 100644 --- a/.github/workflows/build-ultraplot.yml +++ b/.github/workflows/build-ultraplot.yml @@ -99,6 +99,10 @@ jobs: if: steps.cache-baseline.outputs.cache-hit != 'true' || !env.IS_PR run: | mkdir -p ultraplot/tests/baseline + echo "TEST_MODE=${TEST_MODE}" + echo "IS_PR=${IS_PR}" + echo "PR_BASE_SHA=${{ github.event.pull_request.base.sha }}" + echo "TEST_NODEIDS=${TEST_NODEIDS}" # Save PR-selected nodeids for reuse after checkout (if provided) if [ "${TEST_MODE}" = "selected" ] && [ -n "${TEST_NODEIDS}" ]; then printf "%s\n" ${TEST_NODEIDS} > /tmp/pr_selected_nodeids.txt @@ -129,6 +133,7 @@ jobs: echo "${filtered}" } FILTERED_NODEIDS="$(filter_nodeids)" + echo "FILTERED_NODEIDS_BASE=${FILTERED_NODEIDS}" if [ -z "${FILTERED_NODEIDS}" ]; then echo "No valid nodeids found on base; skipping baseline generation." exit 0 @@ -163,6 +168,8 @@ jobs: mkdir -p results python -c "import ultraplot as plt; plt.config.Configurator()._save_yaml('ultraplot.yml')" + echo "TEST_MODE=${TEST_MODE}" + echo "TEST_NODEIDS=${TEST_NODEIDS}" if [ "${TEST_MODE}" = "selected" ] && [ -s /tmp/pr_selected_nodeids.txt ]; then status=0 filter_nodeids() { @@ -176,6 +183,7 @@ jobs: echo "${filtered}" } FILTERED_NODEIDS="$(filter_nodeids)" + echo "FILTERED_NODEIDS_PR=${FILTERED_NODEIDS}" if [ -z "${FILTERED_NODEIDS}" ]; then echo "No valid nodeids found on PR branch; skipping image comparison." exit 0 From 2ee6b6c08043bf16e432899149c2120449f9cf4a Mon Sep 17 00:00:00 2001 From: cvanelteren Date: Sun, 1 Feb 2026 20:19:46 +1000 Subject: [PATCH 2/5] Add select-tests debug logging --- .github/workflows/main.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e2771a443..ea84c9c81 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -54,6 +54,14 @@ jobs: fi git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} > .ci/changed.txt + echo "Changed files:" + cat .ci/changed.txt || true + echo "Test map exists:" + if [ -f .ci/test-map.json ]; then + echo "yes (size=$(wc -c < .ci/test-map.json))" + else + echo "no" + fi python tools/ci/select_tests.py \ --map .ci/test-map.json \ @@ -64,6 +72,8 @@ jobs: --always-full 'ultraplot/__init__.py' \ --ignore 'docs/**' \ --ignore 'README.rst' + echo "Selection output:" + cat .ci/selection.json || true python - <<'PY' > .ci/selection.out import json From 96229513ff55f5bf09fe215d1a72c3666bc2d49e Mon Sep 17 00:00:00 2001 From: cvanelteren Date: Sun, 1 Feb 2026 20:27:33 +1000 Subject: [PATCH 3/5] Align test map cache key with generator --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ea84c9c81..f0c8657d0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,9 +40,9 @@ jobs: uses: actions/cache/restore@v5 with: path: .ci/test-map.json - key: test-map-v2-${{ github.event.pull_request.base.sha }} + key: test-map-${{ github.event.pull_request.base.sha }} restore-keys: | - test-map-v2- + test-map- - name: Select impacted tests id: select From 07f59ddd0fd74fa3f28d71dcfbc50e2302dc56fd Mon Sep 17 00:00:00 2001 From: cvanelteren Date: Sun, 1 Feb 2026 20:38:16 +1000 Subject: [PATCH 4/5] Build test map from test suite coverage --- .github/workflows/test-map.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-map.yml b/.github/workflows/test-map.yml index 5763eecbf..331d2ccf3 100644 --- a/.github/workflows/test-map.yml +++ b/.github/workflows/test-map.yml @@ -36,7 +36,9 @@ jobs: - name: Generate test coverage map run: | mkdir -p .ci - pytest -q --tb=short --disable-warnings -n 0 -p pytest_cov --cov=ultraplot --cov-branch --cov-context=test --cov-report= ultraplot + pytest -q --tb=short --disable-warnings -n 0 -p pytest_cov \ + --cov=ultraplot --cov-branch --cov-context=test --cov-report= \ + ultraplot/tests python tools/ci/build_test_map.py --coverage-file .coverage --output .ci/test-map.json --root . - name: Cache test map From 4694dce3bbe164f71bfc1fa1912e3633eebf79b2 Mon Sep 17 00:00:00 2001 From: cvanelteren Date: Sun, 1 Feb 2026 20:45:21 +1000 Subject: [PATCH 5/5] Generate test map on PR cache miss --- .github/workflows/main.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f0c8657d0..2199fb7e4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -44,6 +44,18 @@ jobs: restore-keys: | test-map- + - name: Build test map on cache miss + if: steps.restore-map.outputs.cache-hit != 'true' + run: | + echo "Test map cache miss; generating map from tests." + python -m pip install --upgrade pip + pip install -e .[tests] coverage + mkdir -p .ci + pytest -q --tb=short --disable-warnings -n 0 -p pytest_cov \ + --cov=ultraplot --cov-branch --cov-context=test --cov-report= \ + ultraplot/tests + python tools/ci/build_test_map.py --coverage-file .coverage --output .ci/test-map.json --root . + - name: Select impacted tests id: select run: |