-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (39 loc) · 1.1 KB
/
rust.yml
File metadata and controls
51 lines (39 loc) · 1.1 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
45
46
47
48
49
50
51
name: Rust
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache Cargo dependencies and build
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build
run: cargo build --all-targets --all-features --verbose
- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Run fmt check
run: cargo fmt -- --check
- name: Run tests
run: cargo test --verbose
- name: Generate code coverage
run: |
cargo install cargo-tarpaulin
cargo tarpaulin --verbose --all-features --workspace --timeout 120 --out Xml
- name: Generate code coverage report
uses: 5monkeys/cobertura-action@master
with:
path: cobertura.xml
repo_token: ${{ secrets.GITHUB_TOKEN }}
minimum_coverage: 75