Skip to content

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

Open
boalambo wants to merge 6 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 6 commits into
rinafcode:mainfrom
boalambo:fix/706-ci-test-timeout

Conversation

@boalambo

Copy link
Copy Markdown
Contributor

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
Contributor Author

Gm maintainer, looking forward to hearing from you.

Resolves conflicts in:
- src/app/api/auth/login/route.ts
- src/app/api/performance/vitals/route.ts
- src/app/components/dashboard/DashboardGrid.tsx
- src/app/hooks/useDashboardWidgets.tsx
- src/components/CommandPalette.tsx
- src/store/synchronizationEngine.ts

All conflicts resolved by accepting upstream/main's fixes from rinafcode#836
(orphaned merge-conflict artifacts) plus reconciling missing imports.
@boalambo

boalambo commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Merge conflicts from #836 are resolved and pushed (build, Type Check/Lint/Validation, and the quality gate are all green ✅).
The test check is failing, and I want to flag why rather than just report it: this is expected, and it's actually confirmation that the fix in this PR works. The old CI step wrapped vitest run in timeout 30s ... || exit 0, silently passing on timeout. This PR removes that fallback and uses timeout-minutes instead, so now the test job is correctly surfacing failures that were previously hidden by the swallowed exit code, not introducing new ones.
I ran the suite locally and traced the failures: they're pre-existing across the repo (missing @/contexts/ThemeContext module, window.matchMedia not mocked in jsdom, pool.test.ts, useSubscriptionClient provider setup, a debounce-timing gap in useDashboardWidgets.test.tsx, etc.) same category already flagged as out-of-scope on #836.
Given the acceptance criteria for #706 is specifically "CI blocks merge on failures instead of hiding them," I think this PR is functionally done, the test check going red here is the intended behavior, not a blocker to fix within this PR's scope. How would you like to proceed, merge this as the CI-visibility fix and track the actual test failures separately, or do you want a broader test-stabilization pass first?

@RUKAYAT-CODER

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