From a03bfa008537b1d86ff789d0823e89ad5d99bd79 Mon Sep 17 00:00:00 2001 From: Alexis Mousset Date: Sat, 14 Apr 2018 15:37:00 +0200 Subject: [PATCH] feat(all): Add codecov upload in travis --- .travis.yml | 21 +++++++++++++++++++++ README.md | 1 + 2 files changed, 22 insertions(+) diff --git a/.travis.yml b/.travis.yml index 75e58c4..9f0e288 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,13 @@ addons: apt: packages: - postfix + - libcurl4-openssl-dev + - libelf-dev + - libdw-dev + - cmake + - gcc + - binutils-dev + - libiberty-dev before_script: - smtp-sink 2525 1000& @@ -24,3 +31,17 @@ before_script: script: - cargo test --verbose --all +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 && + make install DESTDIR=../../kcov-build && + cd ../.. && + rm -rf kcov-master && + for file in target/debug/lettre*[^\.d]; do mkdir -p "target/cov/$(basename $file)"; ./kcov-build/usr/local/bin/kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file"; done && + bash <(curl -s https://codecov.io/bash) && + echo "Uploaded code coverage" diff --git a/README.md b/README.md index 7b8b5cb..3ae5896 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ [![Build Status](https://travis-ci.org/lettre/lettre.svg?branch=master)](https://travis-ci.org/lettre/lettre) [![Build status](https://ci.appveyor.com/api/projects/status/mpwglemugjtkps2d/branch/master?svg=true)](https://ci.appveyor.com/project/amousset/lettre/branch/master) +[![codecov](https://codecov.io/gh/lettre/lettre/branch/master/graph/badge.svg)](https://codecov.io/gh/lettre/lettre) [![Crate](https://img.shields.io/crates/v/lettre.svg)](https://crates.io/crates/lettre) [![Docs](https://docs.rs/lettre/badge.svg)](https://docs.rs/lettre/)