Skip to content

test: fix coverage ci (#316) #167

test: fix coverage ci (#316)

test: fix coverage ci (#316) #167

Workflow file for this run

name: Code Coverage
on:
push:
branches:
- master
paths-ignore:
- '**.md'
- '**.png'
env:
RUST_TOOLCHAIN: nightly
TOOLCHAIN_PROFILE: minimal
jobs:
coverage:
name: Run cargo coverage
runs-on: ubuntu-latest
environment: coverage
env:
CARGO_TERM_COLOR: always
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: ${{ env.TOOLCHAIN_PROFILE }}
toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: llvm-tools-preview
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: sudo bash -c "ulimit -Sl 512 && ulimit -Hl 512 && sudo -u runner /home/runner/.cargo/bin/cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info"
- name: Upload coverage to Codecov
run: bash <(curl -s https://codecov.io/bash) -f lcov.info -t ${{ secrets.CODECOV_TOKEN }}