-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (36 loc) · 953 Bytes
/
ci.yml
File metadata and controls
38 lines (36 loc) · 953 Bytes
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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
name: tests + clippy + fmt
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust: ['1.89.0', 'stable', 'beta']
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: rustfmt
if: matrix.rust == 'stable'
run: cargo fmt --check
- name: clippy
if: matrix.rust == 'stable'
run: cargo clippy --all-targets -- -D warnings
- name: cargo build
run: cargo build
- name: cargo test
run: cargo test --all-features --no-fail-fast
- name: cargo doc
if: matrix.rust == 'stable'
run: cargo doc --no-deps --all-features
env:
RUSTDOCFLAGS: -D warnings