-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (41 loc) · 1.09 KB
/
test-coverage.yaml
File metadata and controls
44 lines (41 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
---
name: Run Test and report Test coverage
on:
push:
branches:
- main
files:
- '**.rs'
- '**.toml'
- '.github/workflows/codequality.yaml'
pull_request:
branches:
- main
files:
- '**.rs'
- '**.toml'
- '.github/workflows/codequality.yaml'
jobs:
tarpaulin:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install rust
run: |
rustup set auto-self-update disable
rustup toolchain install stable --profile minimal
rustup show
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Check formatting with cargo fmt
run: cargo fmt --all -- --check
- name: Install required cargo packages for reporting format
run: cargo install cargo-tarpaulin
- name: Test without default features
run: cargo test --no-default-features
- name: Run Tarpaulin (Test coverage)
run: |
cargo tarpaulin --all-features --coveralls ${{ secrets.COVERALLS_KEY }}