-
Notifications
You must be signed in to change notification settings - Fork 27
50 lines (45 loc) · 1.06 KB
/
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
48
49
50
on:
push:
branches:
- main
pull_request:
schedule:
- cron: '30 3 * * 2'
name: CI
jobs:
test:
name: run tests
strategy:
matrix:
rust: [1.71.1, stable]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Build with default features
run: cargo build
- name: Build with all features
run: cargo build --all-features
- name: Run tests
run: cargo test --all-features
clippy:
name: run clippy lints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.71.1
with:
components: clippy
- run: cargo clippy --all-features
fmt:
name: run rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.71.1
with:
components: rustfmt
- run: rustup component add rustfmt
- run: cargo fmt --all -- --check