From 4de5f319ea851cb86f001f6bdaf54338e144ba7c Mon Sep 17 00:00:00 2001 From: Paul Calnon Date: Sun, 3 May 2026 19:02:25 -0500 Subject: [PATCH] ci(scheduled-tests): tolerate exit-5 (no tests collected) until repo grows slow/integration markers (P-12/P-13) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The canonical Scheduled Tests template runs ``pytest -m "slow or integration"``. This repo's test suite has no tests decorated with either marker, so pytest exits 5 ("no tests collected") and the workflow has been failing on every nightly run since the workflow landed. Soften the run step to swallow exit-5 specifically — every other non-zero exit is still preserved as failure, so a real test regression once such tests exist will still surface. The schedule will start exercising real tests automatically the first time a test in this repo gets ``@pytest.mark.integration`` (the registered marker in pyproject.toml). Refs cross-repo CI audit, P-12 (juniper-data-client) / P-13 (juniper-cascor-client) — both repos receive the identical fix. --- .github/workflows/scheduled-tests.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/scheduled-tests.yml b/.github/workflows/scheduled-tests.yml index d8f28fc..2071111 100644 --- a/.github/workflows/scheduled-tests.yml +++ b/.github/workflows/scheduled-tests.yml @@ -59,13 +59,29 @@ jobs: pip install -e ".[test]" || pip install -e ".[dev]" || pip install -e . - name: Run slow / integration tests + # P-12/P-13 fix: this repo currently has no tests decorated + # ``@pytest.mark.slow`` or ``@pytest.mark.integration``, so + # ``pytest -m "slow or integration"`` exits with code 5 ("no + # tests collected") and fails the workflow. Once this repo grows + # such tests, the gate will exercise them automatically; until + # then, treat exit-5 as success so the schedule stays green and + # genuinely-failing tests still surface (any other non-zero + # exit is preserved as failure). run: | mkdir -p reports/junit + set +e python -m pytest \ -m "slow or integration" \ --tb=short \ --maxfail=10 \ --junitxml=reports/junit/junit-slow.xml + rc=$? + set -e + if [ "$rc" -eq 5 ]; then + echo "::notice::No slow/integration tests collected — exit 5 tolerated until this repo grows such tests." + exit 0 + fi + exit "$rc" - name: Upload Test Results uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1