Skip to content

Commit d1c6644

Browse files
author
Devdutt Shenoi
authored
ci: lint, test and coverage report (#1028)
Signed-off-by: Devdutt Shenoi <[email protected]>
1 parent acb26b9 commit d1c6644

File tree

2 files changed

+57
-61
lines changed

2 files changed

+57
-61
lines changed

.github/workflows/coverage.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
on:
2+
pull_request:
3+
paths-ignore:
4+
- "docs/**"
5+
- "helm/**"
6+
- "assets/**"
7+
- "**.md"
8+
push:
9+
branches:
10+
- main
11+
12+
name: Lint, Test and Coverage Report
13+
jobs:
14+
coverage:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v2
18+
- uses: dtolnay/rust-toolchain@stable
19+
with:
20+
components: clippy
21+
22+
- uses: Swatinem/rust-cache@v2
23+
with:
24+
shared-key: ${{ runner.os }}-cargo
25+
26+
- uses: taiki-e/install-action@v2
27+
with:
28+
tool: cargo-hack, cargo-llvm-cov, nextest
29+
30+
- name: Check with clippy
31+
run: cargo hack clippy --verbose --each-feature --no-dev-deps -- -D warnings
32+
33+
- name: Check docs
34+
run: cargo hack doc --verbose --no-deps --each-feature --no-dev-deps
35+
36+
- name: Doctests
37+
run: cargo hack --each-feature test --doc
38+
39+
- name: Tests
40+
run: cargo hack --each-feature llvm-cov --no-report nextest
41+
42+
- name: Genrate coverage report
43+
run: cargo llvm-cov report --lcov --output-path coverage.lcov
44+
45+
- name: Upload Coverage Report
46+
uses: coverallsapp/[email protected]
47+
with:
48+
github-token: ${{ secrets.GITHUB_TOKEN }}
49+
file: ./coverage.lcov
50+
parallel: true
51+
flag-name: run-${{ matrix.os }}-cargo
52+
53+
- name: Finish Coverage Report
54+
uses: coverallsapp/[email protected]
55+
with:
56+
github-token: ${{ secrets.GITHUB_TOKEN }}
57+
parallel-finished: true

.github/workflows/lint.yaml

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)