From 60eafe9d95649d72b4f94f0ebab261bc3911fb54 Mon Sep 17 00:00:00 2001 From: Emily Samp Date: Fri, 18 Sep 2026 09:07:12 -0500 Subject: [PATCH] Stop duplicate CI runs and surface test runner errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI runs on both `push` and `pull_request`, so every in-repo branch (including Dependabot's) gets two identical runs. On PR #807 the two runs for 43a9411 started three seconds apart: the push run downloaded VS Code 1.137.0 and passed, while the pull_request run died 290ms into "Resolving version..." — the duplicates race each other for the same VS Code download and can get throttled. Limit `push` to main so branch pushes are covered once by the pull_request event, and add a concurrency group so superseded PR runs are cancelled. Post-merge runs on main are not cancelled, so every merged commit keeps its own signal. That failure was also undiagnosable: the catch block in runTest.ts logged "Failed to run tests" and discarded the error, so the log named no cause. Pass the error to console.error. Co-Authored-By: Claude Opus 5 (1M context) Assisted-By: devx/a4b3b2ac-0c11-4784-be17-3f07cf65256b --- .github/workflows/ci.yml | 12 +++++++++++- src/test/runTest.ts | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a522f28e..8dace35c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,16 @@ name: CI -on: [push, pull_request] +on: + push: + branches: [main] + pull_request: + +# In-repo branches (e.g. Dependabot's) would otherwise trigger an identical run +# for both the push and the pull_request event. Those duplicates race each other +# for the VS Code download, which has caused throttling failures. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: build: diff --git a/src/test/runTest.ts b/src/test/runTest.ts index e5ac1337..93975d3b 100644 --- a/src/test/runTest.ts +++ b/src/test/runTest.ts @@ -16,7 +16,7 @@ async function main() { await runTests({ extensionDevelopmentPath, extensionTestsPath }); } catch (err) { // eslint-disable-next-line no-console - console.error("Failed to run tests"); + console.error("Failed to run tests", err); process.exit(1); } }