Codecov: Bash/Shell coverage example
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.travis.yml Use kcov for shell code coverage Sep 7, 2016
readme.md Update readme.md Apr 26, 2018
script.sh initial commit Oct 12, 2015

readme.md

Codecov Bash Example

https://codecov.io @codecov hello@codecov.io

This repository serves as an example on how to integrate with Codecov for Bash/Shell language.

See example coverage here: codecov.io

Basic Usage

Run your tests with kcov in order to create the necessary coverage reports. For example:

kcov output_path script.sh

travis-ci.org

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:

bash <(curl -s https://codecov.io/bash)

Private Repos

Add to your .travis.yml file.

env:
  global:
    - CODECOV_TOKEN=:uuid-repo-token

View source and learn more about Codecov Global Uploader

We are happy to help if you have any questions. Please contact email our Support at support@codecov.io