From 142c5813629966752133dcfc14b0234fe681f266 Mon Sep 17 00:00:00 2001 From: Tim van der Meij Date: Sun, 26 Apr 2026 20:25:21 +0200 Subject: [PATCH] Fix the Codecov token not being usable in the unit tests GitHub Actions workflow The job's environment must be `code-coverage` before it has access to the `CODECOV_TOKEN` secret that's required for pushing coverage data to Codecov. Without it we get an HTTP 400 response with a `Token required because branch is protected` message if it's run from `master`. Fixes f932a58d. --- .github/workflows/unit_tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index f6fc20bb6..55b26b03b 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -35,6 +35,7 @@ jobs: os: [windows-latest, ubuntu-latest] runs-on: ${{ matrix.os }} + environment: code-coverage steps: - name: Checkout repository