Skip to content

ci: Update CI.

ci: Update CI. #5

Workflow file for this run

name: Measure test coverage
on:
push:
branches: [ main ]
paths:
- '**.rs'
- '**.toml'
- '.github/workflows/**'
pull_request:
branches: [ main ]
paths:
- '**.rs'
- '**.toml'
- '.github/workflows/**'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- name: Setup
run: |
rustup component add llvm-tools-preview
cargo install grcov
- name: Checkout code
uses: actions/checkout@v3
- name: Measure test coverage
env:
RUSTFLAGS: "-Cinstrument-coverage"
LLVM_PROFILE_FILE: "coverage-%m-%p.profraw"
run: |
cargo test --all-features
grcov . \
--source-dir . \
--binary-path target/debug \
--branch \
--keep-only 'src/**' \
--output-types "lcov" \
--llvm > coveralls.lcov
- name: Upload to Coveralls
uses: coverallsapp/github-action@v2
with:
format: lcov
file: coveralls.lcov