From 242f4bf0d236de3bc4f1ba17ee82dd19a83f84fe Mon Sep 17 00:00:00 2001 From: Raj D <25481060+radroid@users.noreply.github.com> Date: Thu, 22 Oct 2026 16:21:30 -0400 Subject: [PATCH] ci(coil): desktop tests no longer race Electron's download Electron downloads its binary the first time something imports it. The fork's Test job never fetched it up front, so two desktop test files could start that download at once and collide ("File exists"); the loser failed with "Electron failed to install correctly". It failed main's CI run for 238aed8c8f on DesktopUpdates.test.ts after passing twice on the PR. Run ensure:electron before the tests, as upstream's ci.yml, the release and the weekly verify already do, and in the daily sync's test verify too. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/coil-ci.yml | 6 ++++++ scripts/coil/sync-upstream.sh | 3 +++ 2 files changed, 9 insertions(+) diff --git a/.github/workflows/coil-ci.yml b/.github/workflows/coil-ci.yml index a32aa7703a0ad..88f3d16a5dc4a 100644 --- a/.github/workflows/coil-ci.yml +++ b/.github/workflows/coil-ci.yml @@ -93,6 +93,12 @@ jobs: - name: Install browser secret helper build libraries run: sudo apt-get update && sudo apt-get install -y libsecret-1-dev pkg-config + # Electron downloads its binary on first import. Without this, two desktop test files can + # start that download together and collide ("File exists"), failing whichever loses. + # Upstream's ci.yml runs the same step before its tests. + - name: Ensure Electron runtime is installed + run: vp run --filter @t3tools/desktop ensure:electron + # `@t3tools/monorepo` is the root package; its `test` script is `vp run -r test`. - name: Test run: vp run --filter '!t3' --filter '!@t3tools/monorepo' --filter '!@t3tools/web' test --testTimeout=120000 --hookTimeout=120000 diff --git a/scripts/coil/sync-upstream.sh b/scripts/coil/sync-upstream.sh index 1a7243f1340f3..a8e4571c73f78 100755 --- a/scripts/coil/sync-upstream.sh +++ b/scripts/coil/sync-upstream.sh @@ -217,11 +217,14 @@ fi # for an upstream CPU-bound test here. 120s is the highest any package configures # (apps/server), so it never LOWERS a package's own budget. --hookTimeout is NOT implied by # --testTimeout: a beforeAll/beforeEach carries its own budget. +# ensure:electron runs first so parallel desktop test files do not race Electron's first-import +# download. # Keep in sync with `.github/workflows/coil-ci.yml`. TEST_FLAGS="--testTimeout=120000 --hookTimeout=120000" for script in $VERIFY; do if [[ "$script" == "test" ]]; then commands=( + "$RUN --filter @t3tools/desktop ensure:electron" "$RUN --filter !@t3tools/monorepo --filter !@t3tools/web test $TEST_FLAGS" "$RUN --filter @t3tools/web test $TEST_FLAGS" )