Skip to content

CI: Submit coverage to codecov via pinned PyPI package #1008

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

Merged
merged 2 commits into from
Apr 16, 2021
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@ jobs:
- name: Run tests
run: tools/ci/check.sh
if: ${{ matrix.check != 'skiptests' }}
- uses: codecov/codecov-action@v1
with:
file: for_testing/coverage.xml
- name: Submit coverage
run: tools/ci/submit_coverage.sh
if: ${{ always() }}
- name: Upload pytest test results
uses: actions/upload-artifact@v2
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@ jobs:
- name: Run tests
run: tools/ci/check.sh
if: ${{ matrix.check != 'skiptests' }}
- uses: codecov/codecov-action@v1
with:
file: for_testing/coverage.xml
- name: Submit coverage
run: tools/ci/submit_coverage.sh
if: ${{ always() }}
- name: Upload pytest test results
uses: actions/upload-artifact@v2
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,8 @@ jobs:
- name: Run tests
run: tools/ci/check.sh
if: ${{ matrix.check != 'skiptests' }}
- uses: codecov/codecov-action@v1
with:
file: for_testing/coverage.xml
- name: Submit coverage
run: tools/ci/submit_coverage.sh
if: ${{ always() }}
- name: Upload pytest test results
uses: actions/upload-artifact@v2
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ test =
coverage
pytest !=5.3.4
pytest-cov
pytest-doctestplus
pytest-doctestplus !=0.9.0
all =
%(dicomfs)s
%(dev)s
Expand Down
21 changes: 21 additions & 0 deletions tools/ci/submit_coverage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

echo Submitting coverage

source tools/ci/activate.sh

set -eu

set -x

COVERAGE_FILE="for_testing/coverage.xml"

if [ -e "$COVERAGE_FILE" ]; then
# Pin codecov version to reduce scope for malicious updates
python -m pip install "codecov==2.1.11"
python -m codecov --file for_testing/coverage.xml
fi

set +eux

echo Done submitting coverage