Skip to content

Commit 1b526c3

Browse files
ksundenQuLogic
authored andcommitted
Backport PR #28164: CI: Ensure code coverage is always uploaded
1 parent 7aca466 commit 1b526c3

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

.github/workflows/cygwin.yml

+1-6
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,4 @@ jobs:
245245
run: |
246246
xvfb-run pytest-3.${{ matrix.python-minor-version }} -rfEsXR -n auto \
247247
--maxfail=50 --timeout=300 --durations=25 \
248-
--cov-report=xml --cov=lib --log-level=DEBUG --color=yes
249-
250-
- name: Upload code coverage
251-
uses: codecov/codecov-action@v4
252-
with:
253-
token: ${{ secrets.CODECOV_TOKEN }}
248+
--cov-report=term --cov=lib --log-level=DEBUG --color=yes

.github/workflows/tests.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ jobs:
316316
--cov-report=xml --cov=lib --log-level=DEBUG --color=yes
317317
318318
- name: Filter C coverage
319+
if: ${{ !cancelled() && github.event_name != 'schedule' }}
319320
run: |
320321
if [[ "${{ runner.os }}" != 'macOS' ]]; then
321322
lcov --rc lcov_branch_coverage=1 --capture --directory . \
@@ -331,7 +332,7 @@ jobs:
331332
-instr-profile default.profdata > info.lcov
332333
fi
333334
- name: Upload code coverage
334-
if: ${{ github.event_name != 'schedule' }}
335+
if: ${{ !cancelled() && github.event_name != 'schedule' }}
335336
uses: codecov/codecov-action@v4
336337
with:
337338
name: "${{ matrix.python-version }} ${{ matrix.os }} ${{ matrix.name-suffix }}"

azure-pipelines.yml

+2
Original file line numberDiff line numberDiff line change
@@ -268,11 +268,13 @@ stages:
268268
;;
269269
esac
270270
displayName: 'Filter C coverage'
271+
condition: succeededOrFailed()
271272
- bash: |
272273
bash <(curl -s https://codecov.io/bash) \
273274
-n "$PYTHON_VERSION $AGENT_OS" \
274275
-f 'coverage.xml' -f 'extensions.xml'
275276
displayName: 'Upload to codecov.io'
277+
condition: succeededOrFailed()
276278
277279
- task: PublishTestResults@2
278280
inputs:

0 commit comments

Comments
 (0)