Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
codecov:
notify:
require_ci_to_pass: false

coverage:
status:
project:
default:
target: auto
threshold: 5%
informational: true
patch:
default:
target: auto
threshold: 5%
informational: true

comment:
layout: "reach,diff,flags,tree,betaprofiling"
behavior: default
require_changes: false
22 changes: 16 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
rust-version:
- stable
env:
HAS_COVERALLS_ACCESS: ${{ secrets.COVERALLS_REPO_TOKEN != '' }}
HAS_CODECOV_ACCESS: ${{ secrets.CODECOV_TOKEN != '' }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -57,8 +57,9 @@ jobs:
toolchain: ${{ matrix.rust-version }}
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: Install tarpaulin
run: cargo install cargo-tarpaulin
- name: Install cargo-llvm-cov
if: env.HAS_CODECOV_ACCESS == 'true'
run: cargo install cargo-llvm-cov
- name: Test compilation
run: cargo check --all --all-targets
- name: Test formatting
Expand All @@ -68,10 +69,19 @@ jobs:
- name: Test documentation
run: cargo doc --all --no-deps
- name: Run tests with code coverage
if: ${{ env.HAS_COVERALLS_ACCESS == 'true' }}
run: cargo tarpaulin --release --engine llvm --follow-exec --post-test-delay 10 --coveralls ${{ secrets.COVERALLS_REPO_TOKEN }}
if: env.HAS_CODECOV_ACCESS == 'true'
run: cargo llvm-cov --all-features --workspace --codecov --output-path codecov.json
- name: Upload coverage to Codecov
if: env.HAS_CODECOV_ACCESS == 'true'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: MilesCranmer/rip2
files: ./codecov.json
fail_ci_if_error: false
verbose: true
- name: Run tests
if: ${{ env.HAS_COVERALLS_ACCESS != 'true' }}
if: env.HAS_CODECOV_ACCESS != 'true'
run: cargo test --all

nix:
Expand Down
Loading