File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -144,15 +144,26 @@ jobs:
144144 if : matrix.backend == 'redis'
145145 run : pytest -m redis --cov=cachier --cov-report=term --cov-report=xml:cov.xml
146146
147- - name : Upload coverage to Codecov
147+ - name : Upload coverage to Codecov (non-PRs)
148+ if : github.event_name != 'pull_request' # pushes, scheduled, etc.
148149 continue-on-error : true
149150 uses : codecov/codecov-action@v5
150151 with :
151152 fail_ci_if_error : true
152- name : codecov-umbrella
153153 token : ${{ secrets.CODECOV_TOKEN }} # required
154154 flags : ${{ matrix.backend }}
155155
156+ # We need a separate step for PRs because PRs do not have access to
157+ # secrets; hence, provide the token will give it an empty value,
158+ # resulting in an authentication error.
159+ - name : Upload coverage to Codecov (PRs)
160+ if : github.event_name == 'pull_request' # PRs only
161+ continue-on-error : true
162+ uses : codecov/codecov-action@v5
163+ with :
164+ fail_ci_if_error : true
165+ flags : ${{ matrix.backend }}
166+
156167 testing-guardian :
157168 runs-on : ubuntu-latest
158169 needs : pytester
You can’t perform that action at this time.
0 commit comments