Skip to content

Commit

Permalink
ci: lint, test and coverage report (#1028)
Browse files Browse the repository at this point in the history

Signed-off-by: Devdutt Shenoi <[email protected]>
  • Loading branch information
de-sh authored Dec 10, 2024
1 parent acb26b9 commit d1c6644
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 61 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
on:
pull_request:
paths-ignore:
- "docs/**"
- "helm/**"
- "assets/**"
- "**.md"
push:
branches:
- main

name: Lint, Test and Coverage Report
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy

- uses: Swatinem/rust-cache@v2
with:
shared-key: ${{ runner.os }}-cargo

- uses: taiki-e/install-action@v2
with:
tool: cargo-hack, cargo-llvm-cov, nextest

- name: Check with clippy
run: cargo hack clippy --verbose --each-feature --no-dev-deps -- -D warnings

- name: Check docs
run: cargo hack doc --verbose --no-deps --each-feature --no-dev-deps

- name: Doctests
run: cargo hack --each-feature test --doc

- name: Tests
run: cargo hack --each-feature llvm-cov --no-report nextest

- name: Genrate coverage report
run: cargo llvm-cov report --lcov --output-path coverage.lcov

- name: Upload Coverage Report
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: ./coverage.lcov
parallel: true
flag-name: run-${{ matrix.os }}-cargo

- name: Finish Coverage Report
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
61 changes: 0 additions & 61 deletions .github/workflows/lint.yaml

This file was deleted.

0 comments on commit d1c6644

Please sign in to comment.