diff --git a/.github/actions-rs/grcov.yml b/.github/actions-rs/grcov.yml new file mode 100644 index 0000000..2ef4c15 --- /dev/null +++ b/.github/actions-rs/grcov.yml @@ -0,0 +1,2 @@ +output-type: lcov +output-file: ./lcov.info diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d52ed8c..0a9bcdb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -20,5 +20,27 @@ jobs: uses: Swatinem/rust-cache@v2 with: cache-on-failure: true - - name: Build and test - run: cargo test --all + - name: Build + run: cargo build --verbose + - name: Test + 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: + # 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