Skip to content

test ci

test ci #84

Workflow file for this run

name: Code Coverage
on:
push:
branches: [ "main" ]
pull_request_target:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --verbose
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-C instrument-coverage --deny warnings'
RUSTDOCFLAGS: '-C instrument-coverage'
- name: Run tests
run: cargo test --verbose
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-C instrument-coverage --deny warnings'
RUSTDOCFLAGS: '-C instrument-coverage'
- name: Install grcov
run: if [[ ! -e ~/.cargo/bin/grcov ]]; then cargo install grcov; fi
- name: Run grcov
run: grcov . --binary-path target/debug/ -s . -t coveralls+ --branch --llvm --ignore '../*' --ignore "/*" --ignore 'macros/*' --ignore 'fuzz/*' --ignore '**/tests/**' --token ${{ secrets.COVERALLS_REPO_TOKEN }} > coveralls.json
- id: sha
run: echo "SHA=$(git rev-parse HEAD)" > $GITHUB_OUTPUT
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
git-commit: ${{ steps.sha.outputs.SHA }}