Files
managarr-tree-widget/.github/workflows/coverage.yml
2023-07-17 12:09:10 +02:00

41 lines
938 B
YAML

name: Test Coverage
on:
push:
pull_request:
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- name: Setup Rust
shell: bash -eux {0}
run: |
rustup toolchain install stable --profile minimal --component llvm-tools-preview
rustup default stable
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
key: coverage-${{ hashFiles('**/Cargo.lock') }}
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
- name: Run cargo-llvm-cov
run: cargo llvm-cov --all-features --html
- name: Upload Report
uses: actions/upload-artifact@v3
with:
name: coverage-report
path: target/llvm-cov/html