Codecov Bash Example
Add to your .travis.yml
file.
language: generic
sudo: required
addons:
apt:
packages:
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- cmake
after_success: |
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
tar xzf master.tar.gz &&
cd kcov-master &&
mkdir build &&
cd build &&
cmake .. &&
make &&
sudo make install &&
cd ../.. &&
rm -rf kcov-master &&
mkdir -p coverage &&
kcov coverage script.sh &&
bash <(curl -s https://codecov.io/bash)
Additional apt packages are kcov build dependencies.
Codecov is integrated by the following line in after_success:
Run your tests with kcov in order to create the necessary coverage reports. For example:
kcov output_path script.sh
Repository tokens are required for (a) all private repos, (b) public repos not using Travis-CI, CircleCI or AppVeyor. Find your repository token at Codecov and provide via appending -t <your upload token>
to you where you upload reports.