diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 984db8ee..c2ddb15c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -54,4 +54,15 @@ jobs: - name: Upload coverage results to Codecov uses: codecov/codecov-action@v3 with: + + # The token is not required for public repos, but it makes the workflow + # less likely to randomly fail because of a limit in Codecov CI + # capabilities [1]. However, the secret token doesn't always protect + # against erratic behaviour [2-4]. + # [1] https://github.com/codecov/codecov-action/issues/557#issuecomment-1216749652 + # [2] https://github.com/codecov/codecov-action/issues/557#issuecomment-1223737955 + # [3] https://github.com/codecov/codecov-action/issues/598#issuecomment-1223307820 + # [4] https://github.com/orgs/community/discussions/25701 + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: true