diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml index 53723b3..8671d8c 100644 --- a/.github/workflows/rust.yaml +++ b/.github/workflows/rust.yaml @@ -31,30 +31,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Select Rust nightly build - run: rustup default nightly - - name: Test with profiling - env: - CARGO_INCREMENTAL: 0 - RUSTFLAGS: >- - -Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code - -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort - RUSTDOCFLAGS: >- - -Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code - -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort - run: cargo test --all-features - - name: Install grcov - run: | - curl -L https://github.com/mozilla/grcov/releases/latest/download/grcov-x86_64-unknown-linux-gnu.tar.bz2 \ - | tar jxf - - - name: Run grcov - run: | - mkdir coverage - ./grcov ./target/debug/ -s . -t lcov --llvm --branch --ignore-not-existing \ - --ignore "/*" --ignore "src/error.rs" \ - --excl-line '#\[|=> panic!|unreachable!|Io\(std::io::Error\)|//!|///|^[ }]*$' \ - --excl-br-line '#\[|=> panic!|unreachable!|assert_..!|//!|///' -o ./coverage/lcov.info + - 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: mkdir coverage && cargo llvm-cov --tests --all-features --lcov --output-path ./coverage/lcov.info - name: Send to Coveralls uses: coverallsapp/github-action@master with: