From 0f467f4d7a7ff619dcec6c6af8b3430366950586 Mon Sep 17 00:00:00 2001 From: Yicong Huang Date: Sat, 2 May 2026 01:04:40 -0700 Subject: [PATCH] fix(ci): pass CODECOV_TOKEN to coverage uploads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Codecov's tokenless flow only authenticates fork PRs. Push events on the protected default branch get rejected with "Token required because branch is protected", which has been silent because fail_ci_if_error is false — result: zero reports on apache:main. Closes #4665. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 81bcffab634..84a6ffdb81f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -116,6 +116,7 @@ jobs: if: matrix.os == 'ubuntu-latest' && always() uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5.5.4 with: + token: ${{ secrets.CODECOV_TOKEN }} files: ./frontend/coverage/**/lcov.info flags: frontend fail_ci_if_error: false @@ -247,6 +248,7 @@ jobs: if: always() uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5.5.4 with: + token: ${{ secrets.CODECOV_TOKEN }} files: ./**/target/scala-2.13/jacoco/report/jacoco.xml flags: scala fail_ci_if_error: false @@ -316,6 +318,7 @@ jobs: if: matrix.python-version == '3.12' && always() uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5.5.4 with: + token: ${{ secrets.CODECOV_TOKEN }} files: ./amber/src/main/python/coverage.xml flags: python fail_ci_if_error: false @@ -368,6 +371,7 @@ jobs: if: matrix.os == 'ubuntu-latest' && always() uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5.5.4 with: + token: ${{ secrets.CODECOV_TOKEN }} files: ./agent-service/coverage/lcov.info flags: agent-service fail_ci_if_error: false