From 7a291f76645f37a386f921e74f0c1b1e6d777d97 Mon Sep 17 00:00:00 2001 From: Maksym Pavlenko Date: Thu, 14 Sep 2023 15:00:01 -0700 Subject: [PATCH] fixup! Measure test coverage --- .github/workflows/ci.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) 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/ \