Skip to content

Commit

Permalink
wip: coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
adamws committed Dec 10, 2023
1 parent e9a3182 commit 15cc9c0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,18 @@ jobs:
steps:
- uses: actions/checkout@v3
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- if: matrix.toolchain == 'stable' && github.ref == 'refs/heads/master'
- if: matrix.toolchain == 'stable'
run: |
rustup component add llvm-tools-preview
echo "RUSTFLAGS=-C instrument-coverage" >> $GITHUB_ENV
echo "LLVM_PROFILE_FILE=target/coverage/%p-%m.profraw" >> $GITHUB_ENV
- run: cargo build --features use-rsvg
- run: cargo test --features use-rsvg
- if: matrix.toolchain == 'stable' && github.ref == 'refs/heads/master'
- if: matrix.toolchain == 'stable'
run: |
grcov target/coverage --binary-path target/debug -s . -o target/tmp \
--keep-only "src/*" --keep-only "tests/*" --output-types lcov,html
--keep-only "src/*" --keep-only "tests/*" --output-types lcov,markdown,html
ls -alh
- uses: actions/upload-artifact@v3
with:
name: artifacts-linux-${{ matrix.toolchain }}
Expand Down

0 comments on commit 15cc9c0

Please sign in to comment.