From 227ee8627cfd89a9fd4d9161edbfb7be97038910 Mon Sep 17 00:00:00 2001 From: Jeffrey 'Alex' Clark Date: Wed, 26 Aug 2026 15:32:00 -0400 Subject: [PATCH] ci: disable the Codecov uploads until a token is configured MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both upload steps fail on every run with "Token required because branch is protected" — CODECOV_TOKEN is not set as a repository secret. The failures are non-fatal (fail_ci_if_error: false), so nothing was gated on them, but it means the Codecov data has been silently stale while every job log carried the error. Gate both steps behind `false` rather than deleting them, so re-enabling is just removing that guard once the secret exists. The pytest invocation still writes coverage.xml and junit.xml, so nothing else has to change. The README Codecov badge is left in place; it will show whatever the last successful upload reported until the token is added. --- .github/workflows/ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3681bd0..72cb800 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,16 +33,21 @@ jobs: run: | python -m pytest --cov=dbx_python_cli --cov-report=xml --cov-report=term --junitxml=junit.xml -o junit_family=legacy + # Codecov uploads are disabled until CODECOV_TOKEN is set as a repository + # secret. Without it every upload fails with "Token required because branch + # is protected" — non-fatal (fail_ci_if_error: false) but it means the + # Codecov data has been silently stale, and the error is noise in every job + # log. To re-enable: add the secret, then drop the `if: false` lines below. - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 - if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' + if: false && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' with: file: ./coverage.xml fail_ci_if_error: false token: ${{ secrets.CODECOV_TOKEN }} - name: Upload test results to Codecov - if: ${{ !cancelled() }} + if: ${{ false && !cancelled() }} uses: codecov/test-results-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }}