ci(guard): fail unit-tests job if [birpc] rpc is closed appears in coverage run
Captures npm run test:coverage output with tee and adds an always-run step that greps for the teardown-race fingerprint. Any future regression where a vi.mock factory races with birpc teardown will now surface as an explicit CI failure rather than a silent exit-1 after all tests report green (#535). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -37,11 +37,20 @@ jobs:
|
|||||||
working-directory: frontend
|
working-directory: frontend
|
||||||
|
|
||||||
- name: Run unit and component tests with coverage
|
- name: Run unit and component tests with coverage
|
||||||
run: npm run test:coverage
|
run: npm run test:coverage 2>&1 | tee /tmp/coverage-test.log; exit ${PIPESTATUS[0]}
|
||||||
working-directory: frontend
|
working-directory: frontend
|
||||||
env:
|
env:
|
||||||
TZ: Europe/Berlin
|
TZ: Europe/Berlin
|
||||||
|
|
||||||
|
- name: Assert no birpc teardown race in coverage run
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
if grep -q "rpc is closed" /tmp/coverage-test.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
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Upload coverage reports
|
- name: Upload coverage reports
|
||||||
if: always()
|
if: always()
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|||||||
Reference in New Issue
Block a user