Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase code coverage #333

Merged
merged 23 commits into from
May 21, 2024
37 changes: 16 additions & 21 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
name: coverage

on: [push]
on: [pull_request, push]

jobs:
test:
name: coverage
coverage:
runs-on: ubuntu-latest
container:
image: xd009642/tarpaulin:0.30.0
options: --security-opt seccomp=unconfined
env:
CARGO_TERM_COLOR: always
steps:
- name: Checkout repository
uses: actions/checkout@v2

- uses: actions/checkout@v4
- name: Install Rust
run: rustup update stable
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: |
cargo tarpaulin --tests --examples --verbose --all-features --workspace --timeout 120 --out xml

- name: Workaround for codecov/feedback#263
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"

- name: Upload to codecov.io
uses: codecov/codecov-action@v4.0.1
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true

token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: lcov.info
fail_ci_if_error: true
8 changes: 8 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ignore:
- halo2_proofs/benches
- halo2_proofs/examples
- halo2_proofs/tests
- halo2_frontend/src/dev/graph
- halo2_frontend/src/dev/graph.rs
- halo2_frontend/src/dev/costs.rs
- halo2_frontend/src/dev/cost_model.rs
Loading
Loading