mirror of
https://github.com/boostorg/histogram.git
synced 2025-05-09 23:04:07 +00:00
upload to codecov if token is defined in environment
This commit is contained in:
parent
d075d1b86f
commit
83a271fa38
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,4 +8,5 @@ __pycache__
|
|||||||
.vs*
|
.vs*
|
||||||
*.info
|
*.info
|
||||||
tools/lcov-*
|
tools/lcov-*
|
||||||
|
tools/codecov
|
||||||
coverage-report
|
coverage-report
|
||||||
|
@ -24,9 +24,11 @@ $LCOV --base-directory `pwd` \
|
|||||||
# remove uninteresting entries
|
# remove uninteresting entries
|
||||||
$LCOV --extract coverage.info "*/boost/histogram/*" --output-file coverage.info
|
$LCOV --extract coverage.info "*/boost/histogram/*" --output-file coverage.info
|
||||||
|
|
||||||
if [ $CI ]; then
|
if [ -n $CI ] || [ -n $CODECOV_TOKEN ]; then
|
||||||
# upload if on CI
|
# upload if on CI
|
||||||
curl -s https://codecov.io/bash | bash -s - -f coverage.info -X gcov -x $GCOV
|
curl -s https://codecov.io/bash > tools/codecov
|
||||||
|
chmod u+x tools/codecov
|
||||||
|
tools/codecov -f coverage.info -X gcov
|
||||||
else
|
else
|
||||||
# otherwise generate html report
|
# otherwise generate html report
|
||||||
$LCOV_DIR/bin/genhtml coverage.info -o coverage-report
|
$LCOV_DIR/bin/genhtml coverage.info -o coverage-report
|
||||||
|
Loading…
x
Reference in New Issue
Block a user