From ee23793df050aaea89301a96467653f04a02e2b7 Mon Sep 17 00:00:00 2001 From: badcuban <108198679+badcuban@users.noreply.github.com> Date: Thu, 27 Aug 2026 11:20:12 -0400 Subject: [PATCH 1/3] perf(ci): run test packages in parallel, stop cancelling nightlies CI ran the server test suite only after the web suite finished because vp run keeps package dependency order and server depends on web. Tests have no build dependency, so --parallel lets them overlap. The nightly cron moves from :00 to :07; top-of-hour crons started 14-22 minutes late. The desktop release workflow no longer cancels an in-progress run on the same ref, so a second nightly queues instead of killing a publisher mid-upload. --- .github/workflows/ci.yml | 4 +++- .github/workflows/nightly-release.yml | 6 ++++-- .github/workflows/release.yml | 4 +++- package.json | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9fd388661..3873c8235 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,7 +58,9 @@ jobs: run: vp exec vp run -r --concurrency-limit 2 typecheck - name: Test - run: vp exec vp run test + # --parallel drops package ordering: server depends on web, so without it + # the server suite (~2.5 min) waits for the web suite (~3 min) to finish. + run: vp exec vp run --parallel --concurrency-limit 4 test # Hosted runners point apt at azure.archive.ubuntu.com, which # intermittently stalls for 20+ minutes and starves the job timeout. diff --git a/.github/workflows/nightly-release.yml b/.github/workflows/nightly-release.yml index 6754063b3..e2dea04d9 100644 --- a/.github/workflows/nightly-release.yml +++ b/.github/workflows/nightly-release.yml @@ -2,8 +2,10 @@ name: Nightly Release Cron on: schedule: - # 06:00 ET daily; skips when main has not moved since the newest release. - - cron: "0 10 * * *" + # 06:07 ET daily; skips when main has not moved since the newest release. + # Minute 7, not 0: GitHub queues top-of-the-hour crons the longest (ours + # started 14-22 minutes late). + - cron: "7 10 * * *" workflow_dispatch: permissions: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ac13963d8..5236c7738 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,7 +45,9 @@ permissions: concurrency: group: desktop-release-${{ github.ref }} - cancel-in-progress: true + # Never cancel a publisher mid-run: a second nightly on main queues instead + # of leaving a half-uploaded draft release behind. + cancel-in-progress: false jobs: preflight: diff --git a/package.json b/package.json index e900c6c23..f438b88b5 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "typecheck": "vp run -r --concurrency-limit 2 --cache typecheck", "tc": "vp run -r --concurrency-limit 2 --cache typecheck", "lint": "vp lint --report-unused-disable-directives", - "test": "vp run -r --cache test", + "test": "vp run -r --parallel --concurrency-limit 4 --cache test", "test:desktop-smoke": "vp run --filter @threadlines/desktop smoke-test", "fmt": "vp fmt", "fmt:check": "vp fmt --check", From 813be319c11786a35ba2925cb15b673706ba1fb3 Mon Sep 17 00:00:00 2001 From: badcuban <108198679+badcuban@users.noreply.github.com> Date: Thu, 27 Aug 2026 11:20:12 -0400 Subject: [PATCH 2/3] perf(release): build both macOS artifacts at once max-parallel: 1 made the x64 build wait for arm64 to finish. On the last stable release that added 7 minutes to the critical path. The bound was added with the notarization work without a stated reason; if Apple throttles concurrent notarization this commit is the one to revert. --- .github/workflows/release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5236c7738..51bf3ce68 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -579,7 +579,6 @@ jobs: timeout-minutes: 50 strategy: fail-fast: false - max-parallel: 1 matrix: ${{ fromJSON(needs.preflight.outputs.macos_matrix) }} steps: - name: Checkout From 303652c002da08b1b29667924278a371e2a3cc8f Mon Sep 17 00:00:00 2001 From: badcuban <108198679+badcuban@users.noreply.github.com> Date: Thu, 27 Aug 2026 11:41:46 -0400 Subject: [PATCH 3/3] perf(ci): run browser tests in their own job The browser suite ran after the unit suite inside one job. It shares no state with the other checks, so it now runs beside them. Cuts the pull-request gate from about 8.5 to about 5.5 minutes. --- .github/workflows/ci.yml | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3873c8235..efd2de3df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ concurrency: jobs: quality: - name: Format, Lint, Typecheck, Test, Browser Test, Build + name: Format, Lint, Typecheck, Test, Build runs-on: ubuntu-latest # 20 minutes starves dependency-bump branches: a lockfile change cold-starts # every cache and slow runners then hit the cap mid-pipeline. @@ -62,6 +62,35 @@ jobs: # the server suite (~2.5 min) waits for the web suite (~3 min) to finish. run: vp exec vp run --parallel --concurrency-limit 4 test + - name: Build desktop pipeline + run: vp exec vp run build:desktop + + - name: Verify preload bundle output + run: | + test -f apps/desktop/dist-electron/preload.cjs + grep -nE "desktopBridge|getLocalEnvironmentBootstrap|PICK_FOLDER_CHANNEL|wsUrl" apps/desktop/dist-electron/preload.cjs + + browser: + # Runs beside `quality` rather than after it: the browser suite is the + # second-longest step and shares nothing with the unit suite. + name: Browser Test + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - name: Setup Vite+ + uses: voidzero-dev/setup-vp@313600b80b104eadebb9111787d37a2e83e014ca # v1.17.0 + with: + node-version-file: package.json + cache: true + version: "0.2.4" + run-install: false + + - name: Install dependencies + run: vp install --frozen-lockfile + # Hosted runners point apt at azure.archive.ubuntu.com, which # intermittently stalls for 20+ minutes and starves the job timeout. # Ubuntu 24.04 keeps the active mirror in apt-mirrors.txt, while older @@ -86,14 +115,6 @@ jobs: path: apps/web/src/**/__screenshots__/** if-no-files-found: ignore - - name: Build desktop pipeline - run: vp exec vp run build:desktop - - - name: Verify preload bundle output - run: | - test -f apps/desktop/dist-electron/preload.cjs - grep -nE "desktopBridge|getLocalEnvironmentBootstrap|PICK_FOLDER_CHANNEL|wsUrl" apps/desktop/dist-electron/preload.cjs - release_smoke: name: Release Smoke runs-on: ubuntu-latest @@ -120,6 +141,7 @@ jobs: name: Deploy app.threadlines.dev needs: - quality + - browser - release_smoke if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' && inputs.deploy == true uses: ./.github/workflows/deploy-web.yml