Skip to content

Merge pull request #118 from anton-rs/rf/rm-registry #66

Merge pull request #118 from anton-rs/rf/rm-registry

Merge pull request #118 from anton-rs/rf/rm-registry #66

Workflow file for this run

name: Rust Coverage
on:
push:
branches: [main]
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
coverage:
runs-on: ubuntu-latest
name: codecov
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- uses: taiki-e/install-action@cargo-llvm-cov
- uses: taiki-e/install-action@nextest
- name: cargo generate-lockfile
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile
- name: cargo llvm-cov
run: |
RUST_MIN_STACK=33554432 cargo llvm-cov nextest \
--locked \
--workspace \
--lcov \
--output-path lcov.info \
--profile ci \
-E '!test(test_online)' && \
mv ./target/nextest/ci/junit.xml ./junit.xml
- name: Record Rust version
run: echo "RUST=$(rustc --version)" >> "$GITHUB_ENV"
- name: Upload coverage to codecov.io
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: OS,RUST
files: lcov.info
- name: Upload test results to codecov.io
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}