Skip to content

[WIP] [nextest-runner] initial support for recording runs #2899

[WIP] [nextest-runner] initial support for recording runs

[WIP] [nextest-runner] initial support for recording runs #2899

Workflow file for this run

on:
push:
branches: [main, auto, canary]
pull_request:
branches:
- main
name: Test coverage
jobs:
coverage:
name: Collect test coverage
runs-on: ubuntu-latest
# nightly rust might break from time to time
continue-on-error: true
env:
RUSTFLAGS: -D warnings
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
# Nightly Rust is used for cargo llvm-cov --doc below.
- uses: dtolnay/rust-toolchain@nightly
with:
components: llvm-tools-preview
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2
- name: Install latest nextest release
uses: taiki-e/install-action@nextest
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Collect coverage data
# Generate separate reports for nextest and doctests, and combine them.
run: |
cargo llvm-cov --no-report nextest
cargo llvm-cov --no-report --doc
cargo llvm-cov report --doctests --lcov --output-path lcov.info
- name: Upload coverage data to codecov
uses: codecov/codecov-action@4fe8c5f003fae66aa5ebb77cfd3e7bfbbda0b6b0 # v3
with:
files: lcov.info