diff --git a/.github/actions-rs/grcov.yml b/.github/actions-rs/grcov.yml new file mode 100644 index 0000000..db358d0 --- /dev/null +++ b/.github/actions-rs/grcov.yml @@ -0,0 +1,8 @@ +# grcov . -s . --binary-path ./target/debug/ -t html --branch --ignore-not-existing -o ./target/debug/coverage/ +source-dir: . +binary-path: ./target/debug/ +output-type: lcov +branch: true +ignore-not-existing: true +llvm: true +output-path: ./lcov.info diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index c9c193c..9c8a24a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -22,5 +22,22 @@ jobs: run: cargo fmt -- --check - name: Clippy run: cargo clippy --all-features -- -D warnings - - name: Run tests - run: cargo test --all-features --verbose -- --test-threads=1 + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true + - uses: actions-rs/cargo@v1 + with: + command: test + args: --all-features --no-fail-fast --verbose -- --test-threads=1 + 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' + - uses: actions-rs/grcov@v0.1 + - name: Codecov + uses: codecov/codecov-action@v3 + with: + verbose: true + fail_ci_if_error: true + files: lcov.info