From 18dc8b2a641ed2593c5e560c44b807a5845d2b92 Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Wed, 13 Nov 2024 15:10:56 +0100 Subject: [PATCH] experiment :) --- .github/workflows/ci.yml | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 960f266..eb75bb4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,13 +105,38 @@ jobs: - name: Install `rust` toolchain run: | - rustup toolchain install nightly --no-self-update -c rustfmt --profile minimal + rustup toolchain install nightly --no-self-update -c rustfmt --profile minimal --component llvm-tools-preview rustup default nightly - - name: Install cargo-llvm-cov - uses: taiki-e/install-action@cargo-llvm-cov - - name: Generate code coverage - run: cargo llvm-cov --all-features --lcov --branch --output-path lcov.info + #- name: Build + #env: + #RUSTFLAGS: -Cinstrument-coverage + #run: cargo build + + - name: Test + env: + LLVM_PROFILE_FILE: findutils-%p-%m.profraw + RUSTFLAGS: -Cinstrument-coverage + run: cargo test --workspace --no-fail-fast ${{ matrix.cargo_flags }} + + - name: Generate coverage data + id: grcov + run: | + grcov target/debug/ \ + --branch \ + --llvm \ + --source-dir . \ + --output-path lcov.info \ + --ignore-not-existing \ + --binary-path target/debug/ \ + --excl-line "#\\[derive\\(" \ + --excl-br-line "#\\[derive\\(" \ + --excl-start "#\\[cfg\\(test\\)\\]" \ + --excl-br-start "#\\[cfg\\(test\\)\\]" \ + --commit-sha ${{ github.sha }} \ + --service-job-id ${{ github.job }} \ + --service-name "GitHub Actions" \ + --service-number ${{ github.run_id }} - name: Upload coverage as artifact uses: actions/upload-artifact@v4