diff --git a/.github/actions-rs/grcov.yml b/.github/actions-rs/grcov.yml new file mode 100644 index 0000000..7395d4e --- /dev/null +++ b/.github/actions-rs/grcov.yml @@ -0,0 +1,8 @@ +branch: false +ignore-not-existing: true +llvm: true +output-type: lcov +ignore: + - "/*" + - "C:/*" + - "../*" diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 42ff050..f491d62 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -12,11 +12,25 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v2 - - - name: Run cargo-tarpaulin - uses: actions-rs/tarpaulin@v0.1 + - name: Setup rust toolchain + uses: actions-rs/toolchain@v1 with: - args: "--ignore-tests --features githubActions -- --test-threads 1" - - - name: Upload to codecov.io - uses: codecov/codecov-action@v1 + toolchain: nightly + override: true + - name: Run tests + uses: actions-rs/cargo@v1 + with: + command: test + args: --all-features --no-fail-fast + 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: Coverage with grcov + id: coverage + uses: actions-rs/grcov@v0.1 + - name: Coveralls + uses: coverallsapp/github-action@v1.1.1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + path-to-lcov: ${{ steps.coverage.outputs.report }}