TheGeorge / example-bash

Codecov: Bash/Shell coverage example

Home Page:https://codecov.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Codecov: Bash/Shell coverage example

https://codecov.io


Languages

Language:Shell 100.0%