Skip to content

Commit

Permalink
add cov.yml workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
doitian committed Dec 16, 2024
1 parent 974e5a3 commit d4f4dbf
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/cov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Coverage

on:
push:
branches: [ "main", "develop" ]
pull_request:
branches: [ "main", "develop" ]

env:
CARGO_TERM_COLOR: always

jobs:
unit-tests-coverage:
name: Unit Tests Coverage
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: Run tests
run: cargo test --verbose
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Cllvm-args=--inline-threshold=0 -Zpanic_abort_tests'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Cllvm-args=--inline-threshold=0 -Zpanic_abort_tests'
- name: rust-grcov
uses: actions-rs/[email protected]
- name: Codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
# Repository upload token - get it from codecov.io. Required only for private repositories
# token: # optional
# Specify whether the Codecov output should be verbose
verbose: true
fail_ci_if_error: true

0 comments on commit d4f4dbf

Please sign in to comment.