Skip to content

Commit e719e04

Browse files
committed
Auto merge of #2951 - Turbo87:tarpaulin, r=jtgeibel
CI: Run tests via `cargo-tarpaulin` This PR adds https://github.com/actions-rs/tarpaulin to our CI pipeline to display a test coverage report. Resolves #1162
2 parents 2b77e4e + 23bae68 commit e719e04

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
DATABASE_URL: postgres://postgres:postgres@localhost/cargo_registry_test
8181
TEST_DATABASE_URL: postgres://postgres:postgres@localhost/cargo_registry_test
8282
CARGO_INCREMENTAL: 0
83-
RUSTFLAGS: "-C debuginfo=0 -D warnings"
83+
RUSTFLAGS: "-D warnings"
8484
MALLOC_CONF: "background_thread:true,abort_conf:true,abort:true,junk:true"
8585

8686
services:
@@ -197,7 +197,16 @@ jobs:
197197
cargo fmt -- --check
198198
cargo clippy --all-targets --all-features --all
199199
200-
- name: Test
200+
- name: Install cargo-tarpaulin
201+
if: matrix.rust == 'stable'
202+
run: which cargo-tarpaulin || cargo install cargo-tarpaulin
203+
204+
- name: Run tests (with coverage report)
205+
if: matrix.rust == 'stable'
206+
run: cargo tarpaulin
207+
208+
- name: Run tests
209+
if: matrix.rust != 'stable'
201210
run: cargo test
202211

203212
- name: Prune unnecessary cache

0 commit comments

Comments
 (0)