Skip to content

Commit a2e7b3d

Browse files
committed
chore: add test coverage reporting job to CI
1 parent 5e787bc commit a2e7b3d

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/ci.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,32 @@ jobs:
128128
with:
129129
command: make
130130
args: check-format
131+
132+
test_coverage:
133+
name: test-coverage
134+
runs-on: ubuntu-latest
135+
steps:
136+
- uses: actions/checkout@v2
137+
- name: Install Rust
138+
uses: actions-rs/toolchain@v1
139+
with:
140+
toolchain: ${{ env.CARGO_MAKE_TOOLCHAIN }}
141+
override: true
142+
- name: Cache Cargo
143+
uses: actions/cache@v2
144+
with:
145+
path: |
146+
~/.cargo/registry
147+
~/.cargo/git
148+
key: ${{ github.workflow }}-${{ github.job }}-toolchain-${{ env.CARGO_MAKE_TOOLCHAIN }}
149+
- name: Install cargo-tarpaulin
150+
run: |
151+
cargo install cargo-tarpaulin
152+
- name: Run tests and generate code coverage
153+
run: |
154+
cargo tarpaulin --avoid-cfg-tarpaulin --timeout=360 --out lcov
155+
- name: Push code coverage results to coveralls.io
156+
uses: coverallsapp/github-action@master
157+
with:
158+
github-token: ${{ secrets.GITHUB_TOKEN }}
159+
path-to-lcov: ./lcov.info

0 commit comments

Comments
 (0)