Skip to content

Commit

Permalink
experiment :)
Browse files Browse the repository at this point in the history
  • Loading branch information
cakebaker committed Nov 13, 2024
1 parent bca84ba commit 18dc8b2
Showing 1 changed file with 30 additions and 5 deletions.
35 changes: 30 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 18dc8b2

Please sign in to comment.