Skip to content

Adding coverage

Adding coverage #7

Workflow file for this run

name: Coverage
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
focused-coverage:
name: focused coverage (${{ matrix.test }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test: [file_formats, formats_lib, inspect, prepare, cli, cli_bin, schema, core, runtime_lib, runtime_security, runtime_resources]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Cache Rust build
uses: Swatinem/rust-cache@v2
with:
workspaces: rust
key: coverage-${{ matrix.test }}
- name: Run focused coverage
env:
AUTO_INSTALL_LLVM_COV: "0"
AUTO_INSTALL_LLVM_TOOLS: "0"
TEST_THREADS: "1"
run: ./coverage.sh --no-lint --focused-test "${{ matrix.test }}"