diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 7fc36be..13f3fde 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -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 + cat target/tmp/markdown.md - uses: actions/upload-artifact@v3 with: name: artifacts-linux-${{ matrix.toolchain }}