diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 388b3379..2fa88ee3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,15 +90,24 @@ jobs: - run: | sudo apt-get install protobuf-compiler + + - name: Install grcov + run: | cargo install grcov + grcov --version - - run: | - sudo -E $(command -v cargo) test --all-features + - name: Tests env: RUSTFLAGS: "-Cinstrument-coverage" LLVM_PROFILE_FILE: "target/coverage/%p-%m.profraw" + run: | + sudo -E $(command -v cargo) test --all-features - - run: | + # Fix permissions after sudo. + sudo chown -R $(whoami) target/coverage/ + + - name: Collect coverage data + run: | grcov . \ --source-dir . \ --binary-path ./target/debug/ \