Skip to content

Commit 2a8b4e6

Browse files
committed
use grcov to collect code coverage
1 parent f8a8eff commit 2a8b4e6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/coverage.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ jobs:
2323
toolchain: 1.81.0
2424
components: llvm-tools-preview
2525

26-
- name: Install cargo-llvm-cov
27-
uses: taiki-e/install-action@cargo-llvm-cov
28-
2926
- run: |
3027
sudo apt remove -y postgres*
3128
sudo apt-get install -y wget gnupg
@@ -50,11 +47,13 @@ jobs:
5047
5148
- run: cargo install cargo-pgrx --version 0.12.6
5249
- run: cargo pgrx init --pg16 /usr/lib/postgresql/16/bin/pg_config
50+
- run: cargo install grcov
5351

5452
- name: Generate code coverage
5553
id: coverage
5654
run: |
57-
cargo llvm-cov test --workspace --no-fail-fast --lcov --output-path lcov.info
55+
CARGO_INCREMENTAL=0 RUSTFLAGS='-Clink-args=-Wl,-undefined,dynamic_lookup -Cinstrument-coverage' LLVM_PROFILE_FILE='cargo-test-%p-%m.profraw' cargo test
56+
grcov . --binary-path ./target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o lcov.info
5857
5958
- name: Coveralls upload
6059
uses: coverallsapp/github-action@v2

0 commit comments

Comments
 (0)