Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Ensure code coverage is always uploaded #28164

Merged
merged 1 commit into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 1 addition & 6 deletions .github/workflows/cygwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,4 @@ jobs:
run: |
xvfb-run pytest-3.${{ matrix.python-minor-version }} -rfEsXR -n auto \
--maxfail=50 --timeout=300 --durations=25 \
--cov-report=xml --cov=lib --log-level=DEBUG --color=yes

- name: Upload code coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
--cov-report=term --cov=lib --log-level=DEBUG --color=yes
4 changes: 3 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ jobs:
--cov-report=xml --cov=lib --log-level=DEBUG --color=yes

- name: Cleanup non-failed image files
if: failure()
run: |
function remove_files() {
local extension=$1
Expand Down Expand Up @@ -349,6 +350,7 @@ jobs:
fi

- name: Filter C coverage
if: ${{ !cancelled() && github.event_name != 'schedule' }}
run: |
if [[ "${{ runner.os }}" != 'macOS' ]]; then
lcov --rc lcov_branch_coverage=1 --capture --directory . \
Expand All @@ -364,7 +366,7 @@ jobs:
-instr-profile default.profdata > info.lcov
fi
- name: Upload code coverage
if: ${{ github.event_name != 'schedule' }}
if: ${{ !cancelled() && github.event_name != 'schedule' }}
uses: codecov/codecov-action@v4
with:
name: "${{ matrix.python-version }} ${{ matrix.os }} ${{ matrix.name-suffix }}"
Expand Down
2 changes: 2 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,13 @@ stages:
;;
esac
displayName: 'Filter C coverage'
condition: succeededOrFailed()
- bash: |
bash <(curl -s https://codecov.io/bash) \
-n "$PYTHON_VERSION $AGENT_OS" \
-f 'coverage.xml' -f 'extensions.xml'
displayName: 'Upload to codecov.io'
condition: succeededOrFailed()

- task: PublishTestResults@2
inputs:
Expand Down