Skip to content

Commit 3b05656

Browse files
authored
Merge pull request #77 from ionut-arm/coverage
Add code coverage checking to the nightly run
2 parents 8c02c93 + a53705f commit 3b05656

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

.github/workflows/nightly.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name: Nightly Checks
33
on:
44
schedule:
55
# Every night at midnight
6-
- cron: '0 0 * * *'
6+
- cron: "0 0 * * *"
7+
workflow_dispatch:
78

89
jobs:
910
dependencies:
@@ -33,3 +34,11 @@ jobs:
3334
run: cargo install cargo-audit
3435
- name: Execute cargo audit
3536
run: cargo audit
37+
38+
coverage:
39+
name: Calculate coverage from tests
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/checkout@v1
43+
- name: Execute tarpaulin
44+
run: ./tests/coverage.sh

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/target
22
*patch
33
Cargo.lock
4+
cobertura.xml

tests/coverage.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright 2021 Contributors to the Parsec project.
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
set -euf -o pipefail
7+
8+
cargo install cargo-tarpaulin
9+
10+
cargo tarpaulin --tests --out Xml --exclude-files="src/core/testing/*"
11+
12+
bash <(curl -s https://codecov.io/bash)

0 commit comments

Comments
 (0)