Skip to content

Commit 6c6bd2a

Browse files
committed
Add coverage generation script
1 parent dce1038 commit 6c6bd2a

4 files changed

Lines changed: 16 additions & 7 deletions

File tree

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
- run:
7272
name: coverage with tarpaulin
7373
command: |
74-
docker run --security-opt seccomp=unconfined -v "${PWD}:/volume" xd009642/tarpaulin:latest-nightly cargo tarpaulin --all --verbose --out Xml
74+
./coverage.sh --out Xml
7575
bash <(curl -s https://codecov.io/bash)
7676
7777
workflows:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/target
22
**/*.rs.bk
3+
tarpaulin-report.html

Makefile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
.PHONY: docker-coverage
22
docker-coverage:
3-
docker run \
4-
--rm \
5-
--security-opt seccomp=unconfined \
6-
--volume "$(shell pwd):/volume" \
7-
xd009642/tarpaulin \
8-
cargo tarpaulin --all --verbose
3+
./coverage.sh --out Html
94

105
.PHONY: docker-test
116
docker-test:

coverage.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
exec docker run \
4+
--rm \
5+
--security-opt seccomp=unconfined \
6+
--volume "${PWD}:/volume" \
7+
xd009642/tarpaulin:latest-nightly \
8+
cargo tarpaulin \
9+
--all \
10+
--verbose \
11+
--exclude-files 'tests/*' \
12+
--exclude-files 'parser/src/errors.rs' \
13+
"$@"

0 commit comments

Comments
 (0)