Tweak coverage job (#364)
* Add step ids, better names * Split out Clippy to its own job * If coverage goes down, don't fail the build * Go back to tarpaulin * bump version of tarpaulin * config tarpaulin
This commit is contained in:
parent
df7ed7ae81
commit
d53d69aa6e
|
|
@ -19,51 +19,34 @@ jobs:
|
||||||
BRANCH_NAME=${BRANCH_NAME,,} && \
|
BRANCH_NAME=${BRANCH_NAME,,} && \
|
||||||
gcloud builds submit . --config cloudbuild.yaml --project zealous-zebra --substitutions BRANCH_NAME=$BRANCH_NAME
|
gcloud builds submit . --config cloudbuild.yaml --project zealous-zebra --substitutions BRANCH_NAME=$BRANCH_NAME
|
||||||
|
|
||||||
|
grcov:
|
||||||
codecov:
|
name: Code Coverage
|
||||||
name: Code Coverage & Clippy
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v2
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
override: true
|
override: true
|
||||||
- name: Cache cargo registry
|
- name: Run cargo-tarpaulin
|
||||||
uses: actions/cache@v1
|
uses: actions-rs/tarpaulin@v0.1
|
||||||
with:
|
with:
|
||||||
path: ~/.cargo/registry
|
version: '0.12.3'
|
||||||
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
timeout: 300
|
||||||
- name: Cache cargo index
|
- name: Upload coverage report to Codecov
|
||||||
uses: actions/cache@v1
|
uses: codecov/codecov-action@v1
|
||||||
|
|
||||||
|
clippy:
|
||||||
|
name: Clippy
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
path: ~/.cargo/git
|
toolchain: stable
|
||||||
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
|
override: true
|
||||||
- name: Cache cargo build
|
|
||||||
uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: target
|
|
||||||
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
- name: Run clippy
|
- name: Run clippy
|
||||||
uses: actions-rs/clippy-check@v1
|
uses: actions-rs/clippy-check@v1
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
args: --all-features
|
args: --all-features
|
||||||
- name: Install cargo-tarpaulin
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: install
|
|
||||||
args: cargo-tarpaulin
|
|
||||||
- name: Generate coverage report
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: tarpaulin
|
|
||||||
args: --verbose --count --workspace --timeout 300 --out Xml
|
|
||||||
- name: Archive code coverage results
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: code-coverage-report
|
|
||||||
path: cobertura.xml
|
|
||||||
- uses: codecov/codecov-action@v1
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
|
||||||
|
coverage:
|
||||||
|
range: "50...100"
|
||||||
|
status:
|
||||||
|
project:
|
||||||
|
default:
|
||||||
|
informational: true
|
||||||
|
|
||||||
|
parsers:
|
||||||
|
gcov:
|
||||||
|
branch_detection:
|
||||||
|
conditional: yes
|
||||||
|
loop: yes
|
||||||
|
method: yes
|
||||||
|
macro: yes
|
||||||
Loading…
Reference in New Issue