Skip to content

fix: fail CI on test timeout and upload vitest report on failure (closes #706)#853

Open
boalambo wants to merge 4 commits into
rinafcode:mainfrom
boalambo:fix/706-ci-test-timeout
Open

fix: fail CI on test timeout and upload vitest report on failure (closes #706)#853
boalambo wants to merge 4 commits into
rinafcode:mainfrom
boalambo:fix/706-ci-test-timeout

Conversation

@boalambo

Copy link
Copy Markdown

Problem

The test step in .github/workflows/ci.yml wrapped vitest run in a
shell timeout with || exit 0. This caused the CI job to always exit
with code 0 — even when tests failed or the suite timed out — giving
false confidence and allowing broken builds to be merged undetected.

Changes

  • Removed the || exit 0 fallback and the shell timeout wrapper
  • Added timeout-minutes: 5 directly on the Run Tests step so
    GitHub Actions enforces the limit and fails the job on expiry
  • Added --reporter=json --outputFile=vitest-report.json to Vitest
    so a structured report is written during the run
  • Added an Upload test report on failure step that uploads
    vitest-report.json as a CI artifact when the job fails

Acceptance Criteria

  • A test suite timeout causes the CI job to exit with a non-zero code
  • The pipeline blocks the PR merge when tests timeout
  • Test output is available as a CI artifact for debugging

Impacted Files

  • .github/workflows/ci.yml

Closes #706

@drips-wave

drips-wave Bot commented Jun 29, 2026

Copy link
Copy Markdown

@boalambo Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@boalambo

Copy link
Copy Markdown
Author

Hello Ma.

This PR fixes issue #706 by removing the || exit 0 fallback from the
test step and replacing it with GitHub Actions' built-in timeout-minutes
field, so timeouts now fail the job visibly. A Vitest JSON report is also
uploaded as a CI artifact on failure for easier debugging.

I noticed the Type Check, Lint & Validation job is failing but this
appears to be a pre-existing issue unrelated to the changes in this PR
(only .github/workflows/ci.yml was modified). Happy to address it if
needed, otherwise please let me know if there's anything else to change. 🙏

Just asking to be sure. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] CI test job exits 0 on timeout, silently hiding test failures

1 participant