summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Ieni <11428655+MarcoIeni@users.noreply.github.com>2020-11-26 05:27:31 +0100
committerGitHub <noreply@github.com>2020-11-25 23:27:31 -0500
commit5fd7a1acea7ba0a3c3669ef25d9f4d7ecd54bfa4 (patch)
tree3aca5d1c723ed19ecd94a3cc0a050f147c5e84a7
parent2309db4436974a28b310259bc2935d33fb3332e4 (diff)
CI: add code coverage (#409)
Signed-off-by: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com>
-rw-r--r--.github/workflows/ci.yml23
-rw-r--r--README.md1
2 files changed, 24 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 51b967df..fa6e2e2a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -60,3 +60,26 @@ jobs:
# with:
# command: clippy
# args: -- -D warnings
+
+ coverage:
+ name: Code coverage
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+ - name: Install stable toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ override: true
+ - name: Run cargo-tarpaulin
+ uses: actions-rs/tarpaulin@v0.1
+ with:
+ args: '--ignore-tests --out Lcov --output-dir target/tarpaulin'
+ - name: Upload to Coveralls
+ # upload only if push
+ if: ${{ github.event_name == 'push' }}
+ uses: coverallsapp/github-action@master
+ with:
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ path-to-lcov: './target/tarpaulin/lcov.info'
diff --git a/README.md b/README.md
index d7775aff..db56380f 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,7 @@
[![Build Status](https://travis-ci.com/dandavison/delta.svg?branch=master)](https://travis-ci.com/dandavison/delta)
[![Gitter](https://badges.gitter.im/dandavison-delta/community.svg)](https://gitter.im/dandavison-delta/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![CI](https://github.com/dandavison/delta/workflows/Continuous%20Integration/badge.svg)](https://github.com/dandavison/delta/actions)
+[![Coverage Status](https://coveralls.io/repos/github/dandavison/delta/badge.svg?branch=master)](https://coveralls.io/github/dandavison/delta?branch=master)
## A viewer for git and diff output