Move coverage step to common workflow for PRs and pushes to main (#984)

So we can consistently collect coverage data on the default branch, which CodeCov needs
to compare branch coverage and line data against.
This commit is contained in:
Deirdre Connolly 2020-09-01 16:47:34 -04:00 committed by GitHub
parent ffdec0cb23
commit f967e29d13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 17 deletions

View File

@ -91,20 +91,3 @@ jobs:
with:
command: fmt
args: --all -- --check
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Run cargo-tarpaulin
uses: actions-rs/tarpaulin@v0.1
with:
version: 'latest'
timeout: 600
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v1.0.13

28
.github/workflows/coverage.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Run cargo-tarpaulin
uses: actions-rs/tarpaulin@v0.1
with:
version: 'latest'
timeout: 600
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v1.0.13