forked from copterust/bmp280
-
Notifications
You must be signed in to change notification settings - Fork 7
48 lines (38 loc) · 977 Bytes
/
ci.yml
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
on: [push, pull_request]
name: Continuous integration
# Stops the running workflow of previous pushes
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
lints-and-checks:
name: Lints and checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Rustfmt lints
run: cargo fmt --all -- --check
- name: Clippy lints
run: cargo clippy --no-deps -- -D warnings
build-and-test:
name: Build and test
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- beta
- nightly
- 1.62 # MSRV
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- run: cargo build
- run: cargo test