Skip to content

feat: support add extra watch file #342

feat: support add extra watch file

feat: support add extra watch file #342

Workflow file for this run

name: Code Coverage
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 10240
temp-reserve-mb: 4096
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
- uses: actions/checkout@v3
- name: Install Rust
uses: oxidecomputer/actions-rs_toolchain@oxide/master
- name: Cache rust artifacts
uses: Swatinem/rust-cache@v2
with:
shared-key: cargo-test-code-coverage-grcov
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Dependencies
run: npm install -g pnpm && pnpm i --frozen-lockfile
- uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: rustup component add llvm-tools-preview
- run: cargo install grcov
- run: CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='cargo-test-%p-%m.profraw' cargo test
- run: grcov . --binary-path ./target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o target/tests.lcov
- name: Upload to codecov.io
uses: codecov/codecov-action@v3
- name: Archive code coverage results
uses: actions/upload-artifact@v1
with:
name: code-coverage-report
path: target/tests.lcov