Skip to content

Commit

Permalink
ci: add codecov support
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianfreyer committed Mar 30, 2019
1 parent 22c8194 commit 76bec57
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ task:
matrix:
image: freebsd-12-0-release-amd64
image: freebsd-11-2-release-amd64
env:
CIRRUS_SHELL: /bin/sh
CODECOV_TOKEN: ENCRYPTED[19ed503f60fa4f0b823144ff622e376976033344ed8c23ff4b1a7c0cbc4d229613773f0daab548b4f15c2ec52149634b]
install_script: |
pkg install -y curl
curl https://sh.rustup.rs -sSf | sh -s -- -y
Expand All @@ -11,4 +14,16 @@ task:
folder: $CARGO_HOME/registry
build_script: env PATH="$HOME/.cargo/bin:$PATH" cargo build
test_script: env PATH="$HOME/.cargo/bin:$PATH" cargo test
coverage_script: |
cat $0
echo $SHELL
ls -lha target
find target/debug -maxdepth 1 -iname 'rctl-*[^\.d]'
pkg install -y kcov bash git
for file in target/debug/rctl-*[^\.d]; do
mkdir -p "target/cov/`basename $file`"
kcov --exclude-pattern=$HOME/.cargo,/usr/lib,/usr/local/lib,/usr/src/lib/ --verify "target/cov/`basename $file`" "$file"
done
curl -s https://codecov.io/bash | bash
echo "Uploaded code coverage"
before_cache_script: rm -rf $CARGO_HOME/registry/index
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# rctl

[![Build Status](https://api.cirrus-ci.com/github/fubarnetes/rctl.svg)](https://cirrus-ci.com/github/fubarnetes/rctl)
[![Code Coverage](https://img.shields.io/codecov/c/github/fubarnetes/rctl.svg?logo=codecov&style=flat-square)](https://codecov.io/gh/fubarnetes/rctl)
[![Crates.io](https://img.shields.io/crates/v/rctl.svg?style=flat-square)](https://crates.io/crates/rctl)
[![GitHub last commit](https://img.shields.io/github/last-commit/fubarnetes/rctl.svg?style=flat-square)](https://github.com/fubarnetes/librctl-rs/commits/master)
[![Gitter](https://img.shields.io/gitter/room/fubarnetes/rctl.js.svg?style=flat-square)](https://gitter.im/fubarnetes/librctl-rs)
Expand Down

0 comments on commit 76bec57

Please sign in to comment.