From 68cfa2821c9798f00d62d5f81919298cf61bcb23 Mon Sep 17 00:00:00 2001 From: Yuval Shavit Date: Sun, 9 Jun 2024 02:23:26 -0400 Subject: [PATCH] add code coverage workflow see: https://github.com/taiki-e/cargo-llvm-cov?tab=readme-ov-file#continuous-integration --- .github/workflows/coverage.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/coverage.yml diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 0000000..7583051 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,22 @@ +name: Coverage + +on: [pull_request, push] + +jobs: + coverage: + runs-on: ubuntu-latest + env: + CARGO_TERM_COLOR: always + steps: + - uses: actions/checkout@v4 + - name: Install Rust + run: rustup update stable + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + - name: Generate code coverage + run: cargo llvm-cov --all-features --workspace --codecov --output-path codecov.json + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + files: codecov.json + fail_ci_if_error: true