generated from EmbarkStudios/opensource-template
-
Notifications
You must be signed in to change notification settings - Fork 20
60 lines (53 loc) · 1.42 KB
/
ci.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
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
name: CI
jobs:
lint:
name: Lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: "rustfmt,clippy"
# make sure all code has been formatted with rustfmt
- name: check rustfmt
run: cargo fmt -- --check --color always
# run clippy to verify we have no warnings
- run: cargo fetch
- name: clippy
run: cargo clippy --all-targets --all-features -- -D warnings
deny-check:
name: cargo-deny check
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1
msrv-check:
name: Minimum Stable Rust Version Check
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: dtolnay/[email protected]
- run: cargo fetch
- name: cargo check
run: cargo check --all-targets --all-features
test:
name: Test
strategy:
matrix:
os: [ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo fetch
- name: cargo build
run: cargo build --tests --all-features
- run: cargo test --all-features