ci: Avoid running vitest in interactive/watch mode on CI#3593
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3593 +/- ##
=======================================
Coverage 75.65% 75.65%
=======================================
Files 51 51
Lines 2752 2752
Branches 411 407 -4
=======================================
Hits 2082 2082
Misses 668 668
Partials 2 2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
1ae7b88 to
6dd0ada
Compare
|
I can still reproduce the problematic test locally after reverting the commit that upgraded Node to v24. So the problem seems to be in the test logic. |
See #3593 for context. It gets old fast having to manually cancel [all those stuck jobs](https://github.com/electric-sql/electric/actions/workflows/ts_test.yml).
6dd0ada to
e82672e
Compare
|
To summarize, this PR does not address the problem I thought was caused by stuck Vitest by default checks for the presence of the |
Starting on December 10, the Test TS packages against sync-service (packages/typescript-client) CI job started hanging until cancelled by GH Actions after 6 hours of runtime.
This seems to be related to the fact that
pnpm coverageandpnpm testrun in interactive mode by default. Passing the--runcommand-line flag to those prevents this behaviour and makes sure the process exits after it has finished running the tests.EDIT: found the actual culprit, it's not the way we run
pnpm coveragebut a certain test that got added in a recent PR causes the test runner to hang. The CI job on that PR is the first known occurrence of the "CI job stuck for 6 hours" problem.I have reproduced it locally by running
pnpm exec vitest --coverage "--run". The test runner was stuck runningtest/stream.test.tsfor some minutes, then produced the following output and exited with exit code 1: