-
Notifications
You must be signed in to change notification settings - Fork 10
35 lines (32 loc) · 896 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
on: [push, pull_request]
name: Continuous integration
jobs:
check-test:
name: Check and test crate
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
- "1.61"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
# Default features
- run: cargo check --all-targets
- run: cargo test
# No default features
- run: cargo check --all-targets --no-default-features
- run: cargo test --no-default-features
clippy-fmt:
name: Run Clippy and format code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- run: cargo clippy --all-targets -- -D warnings
- run: cargo fmt --check