From 9a14c0499e5987c20fb57960d54ea6d9009d3b46 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 26 May 2026 10:55:29 -0400 Subject: [PATCH] ci: upload code coverage on PRs Add actions/upload-code-coverage@v1 step to the CI workflow so the Cobertura report produced by vitest is uploaded to GitHub's code coverage API. Restricted to the ubuntu-latest + Node 22.x matrix entry to avoid duplicate uploads, and uses fail-on-error: false so transient API failures don't break CI. --- .github/workflows/ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee348c1f62..b1958196ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,10 @@ jobs: build: name: "Build (${{ matrix.os }}, Node ${{ matrix.node-version }})" runs-on: ${{ matrix.os }} + permissions: + contents: read + code-quality: write + pull-requests: read strategy: fail-fast: false matrix: @@ -56,6 +60,15 @@ jobs: - name: Test run: pnpm vitest run --config ./vitest.config.fast.ts --coverage --reporter=github-actions --reporter=default + - name: Upload code coverage + if: matrix.os == 'ubuntu-latest' && matrix.node-version == '26.x' + uses: actions/upload-code-coverage@v1 + with: + file: ./coverage/cobertura-coverage.xml + language: TypeScript + label: code-coverage/vitest + fail-on-error: false + - name: Regen samples run: pnpm run regen-samples