Skip to content

Commit

Permalink
feat: code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
ethicnology committed Nov 14, 2024
1 parent 3278146 commit 87879a5
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: coverage

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true

- name: Build
run: cargo build --verbose

- name: Run tests
run: cargo test --verbose
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'

- name: rust-grcov
# You may pin to the exact commit or the version.
# uses: actions-rs/grcov@bb47b1ed7883a1502fa6875d562727ace2511248
uses: actions-rs/grcov@v0.1

- name: Codecov
# You may pin to the exact commit or the version.
# uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
verbose: true
fail_ci_if_error: true

0 comments on commit 87879a5

Please sign in to comment.