From 4ba73ba17d027df5f811f6630592e31ec295430e Mon Sep 17 00:00:00 2001 From: JuanLeon Lahoz Date: Fri, 14 May 2021 14:06:38 +0200 Subject: [PATCH] dev: add code coverage badge --- .gitignore | 1 + Makefile | 9 +++++++-- README.md | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d0a38e9..ad29945 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /target *.tar.gz +cobertura.xml diff --git a/Makefile b/Makefile index 1d2ff61..e3a5912 100644 --- a/Makefile +++ b/Makefile @@ -3,10 +3,15 @@ pre-commit: cargo test -- --test-threads 1 cargo clippy -- -D clippy::all +release: + cargo build --release + # Sadly, this misses coverage for those integrations tests that use # assert_cmd, as it does not follow forks coverage: cargo tarpaulin -- --test-threads 1 -release: - cargo build --release +# TODO: add trigger for this target from within github actions +codecov: + cargo tarpaulin --out Xml -- --test-threads 1 + codecov-io diff --git a/README.md b/README.md index 52cba38..0237d1b 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ Tool to draw low-resolution graphs in terminal. [![Rust](https://github.com/juan-leon/lowcharts/actions/workflows/test.yml/badge.svg)](https://github.com/juan-leon/lowcharts/actions/workflows/test.yml) +[![codecov](https://codecov.io/gh/juan-leon/lowcharts/branch/main/graph/badge.svg?token=FNTO8M149T)](https://codecov.io/gh/juan-leon/lowcharts) [![dependency status](https://deps.rs/repo/github/juan-leon/lowcharts/status.svg)](https://deps.rs/repo/github/juan-leon/lowcharts) **lowcharts** is meant to be used in those scenarios where we have numerical