Add coverage report.

This commit is contained in:
Sebastian Schmidt 2021-06-02 18:00:50 +03:00
parent aeb822db9c
commit 9aa025242d

View File

@ -3,7 +3,7 @@ name: Continuous Integration
on: [push, pull_request] on: [push, pull_request]
jobs: jobs:
build_and_test: build_test_format_lint:
name: ${{matrix.command.name}} (${{matrix.toolchain}}) name: ${{matrix.command.name}} (${{matrix.toolchain}})
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -45,7 +45,8 @@ jobs:
target target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1 - name: Install toolchain
uses: actions-rs/toolchain@v1
with: with:
toolchain: ${{ matrix.toolchain }} toolchain: ${{ matrix.toolchain }}
override: true override: true
@ -57,3 +58,44 @@ jobs:
with: with:
command: ${{matrix.command.command}} command: ${{matrix.command.command}}
args: ${{matrix.command.args}} args: ${{matrix.command.args}}
coveralls_io:
name: Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ⚡ Cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
default: true
- name: Install cargo-tarpaulin
uses: actions-rs/install@v0.1
with:
crate: cargo-tarpaulin
version: latest
use-tool-cache: true
- name: Coverage Report with tarpaulin
uses: actions-rs/cargo@v1
with:
command: tarpaulin
args: --manifest-path implementation/Cargo.toml --all --all-features --out Lcov -- --test-threads 1
- name: Upload Coverage
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./lcov.info