-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (58 loc) · 1.85 KB
/
build.yaml
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
on:
push:
branches:
- main
pull_request:
name: Build
jobs:
ci:
name: CI
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
toolchain: [ stable ]
runs-on: ${{ matrix.os }}
steps:
- name: Check out
uses: actions/checkout@v3
- name: Set up ${{ matrix.toolchain }} Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- name: Set up Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
~/.cargo/.crates.toml
~/.cargo/.crates2.json
key: ${{ runner.os }}-${{ matrix.toolchain }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-${{ matrix.toolchain }}-cargo-
- name: Install Tarpaulin
if: matrix.os == 'ubuntu-latest'
continue-on-error: true
run: cargo install cargo-tarpaulin
- name: Install & Run Semver
if: matrix.os == 'ubuntu-latest'
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
rust-toolchain: ${{ matrix.toolchain }}
feature-group: all-features
verbose: true
- name: Run Cargo:fmt
run: cargo fmt --all -- --check
- name: Run Cargo:clippy
run: cargo clippy --all-features -- -D warnings
- name: Run Cargo:test
run: cargo test --verbose --all-features
- name: Run Cargo:tarpaulin
if: matrix.os == 'ubuntu-latest'
run: cargo tarpaulin --verbose --all-features --out Xml --output-dir ./coverage
- name: Upload Codecov
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v3
with:
files: ./coverage/cobertura.xml