From 7b921bfa0a406ee8f5240a87c8c2a29a6f59cd98 Mon Sep 17 00:00:00 2001 From: Marcel Date: Mon, 11 May 2026 23:18:22 +0200 Subject: [PATCH] ci(coverage): harden coverage guard step - Add explicit set -eo pipefail so npm test:coverage exit code propagates through the pipe (not just tee's always-0 exit) - Scope log file to github.run_id to prevent stale-log false positives on retried steps sharing the same runner /tmp - Tighten grep pattern to \[birpc\] rpc is closed to avoid matching unrelated log lines that happen to contain "rpc is closed" Co-Authored-By: Claude Sonnet 4.6 --- .gitea/workflows/ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index d1eda590..d72339c0 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -38,7 +38,9 @@ jobs: - name: Run unit and component tests with coverage shell: bash - run: npm run test:coverage 2>&1 | tee /tmp/coverage-test.log + run: | + set -eo pipefail + npm run test:coverage 2>&1 | tee /tmp/coverage-test-${{ github.run_id }}.log working-directory: frontend env: TZ: Europe/Berlin @@ -47,9 +49,9 @@ jobs: shell: bash if: always() run: | - if grep -q "rpc is closed" /tmp/coverage-test.log 2>/dev/null; then + if grep -q "\[birpc\] rpc is closed" /tmp/coverage-test-${{ github.run_id }}.log 2>/dev/null; then echo "FAIL: [birpc] rpc is closed teardown race detected in coverage run" - grep "rpc is closed" /tmp/coverage-test.log + grep "\[birpc\] rpc is closed" /tmp/coverage-test-${{ github.run_id }}.log exit 1 fi