Skip to content

Commit

Permalink
Code coverage test version
Browse files Browse the repository at this point in the history
  • Loading branch information
svartalf committed Sep 18, 2019
1 parent 9e39a40 commit 9091a8f
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/actions-rs/grcov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
branch: true
output-type: coveralls+
51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,54 @@ jobs:
with:
command: fmt
args: --all -- --check

code_coverage:
runs-on: ${{ matrix.os }}
needs: ci
strategy:
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
toolchain:
- nightly

steps:
- uses: actions/checkout@v1

- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true

- name: Execute tests
uses: actions-rs/cargo@v1
with:
command: test
args: --all --all-features
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads"

- name: Gather coverage data
id: coverage
uses: actions-rs/grcov@dev

- name: Coveralls upload
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
path-to-lcov: ${{ steps.coverage.outputs.report }}

code_coverage_finalize:
runs-on: ubuntu-latest
needs: code_coverage
steps:
- name: Coveralls finalization
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true

0 comments on commit 9091a8f

Please sign in to comment.