2017-01-19 18:54:54 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# gather the coverage data
|
2019-11-20 15:00:59 +03:00
|
|
|
if [[ "$MATRIX_OS" == "macOS-latest" ]]; then
|
|
|
|
brew install lcov
|
|
|
|
else
|
|
|
|
sudo apt-get -qq install lcov
|
|
|
|
fi
|
|
|
|
|
2017-01-19 18:54:54 +03:00
|
|
|
lcov --capture --directory . -b . --output-file coverage.info
|
|
|
|
# filter to remove system headers
|
|
|
|
lcov --remove coverage.info '/usr/*' -o coverage.filtered.info
|
|
|
|
# convert to json
|
2019-12-30 12:44:15 +03:00
|
|
|
sudo gem install coveralls-lcov
|
2017-01-19 18:54:54 +03:00
|
|
|
coveralls-lcov -v -n coverage.filtered.info > coverage.c.json
|
|
|
|
|
2017-02-03 09:58:42 +03:00
|
|
|
pip install codecov
|
2019-12-30 12:44:15 +03:00
|
|
|
coverage report
|
|
|
|
|
2019-09-26 15:12:28 +03:00
|
|
|
pip install coveralls-merge
|
|
|
|
coveralls-merge coverage.c.json
|
2019-11-20 15:00:59 +03:00
|
|
|
if [[ $TRAVIS ]]; then
|
|
|
|
codecov
|
|
|
|
fi
|
2017-01-19 18:54:54 +03:00
|
|
|
|
2019-09-26 15:12:28 +03:00
|
|
|
if [ "$TRAVIS_PYTHON_VERSION" == "3.7" ] && [ "$DOCKER" == "" ]; then
|
2017-11-08 15:19:56 +03:00
|
|
|
# Coverage and quality reports on just the latest diff.
|
|
|
|
depends/diffcover-install.sh
|
|
|
|
depends/diffcover-run.sh
|
2017-01-20 22:34:13 +03:00
|
|
|
fi
|