-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (45 loc) · 1.41 KB
/
ci.yml
File metadata and controls
48 lines (45 loc) · 1.41 KB
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
on:
push:
branches:
- main
pull_request:
name: CI
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
- name: Lint (clippy)
run: cargo clippy --all-targets
- name: Lint (rustfmt)
run: cargo fmt --check
- name: Check for differences
run: git diff --exit-code
build-and-test:
name: Build and test
runs-on: ubuntu-latest
env:
RUSTFLAGS: -D warnings
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
- uses: taiki-e/install-action@nextest
- name: Build
run: cargo build
- name: Build with all features
run: cargo build --all-features
- name: Run tests
run: cargo nextest run
- name: Doctests
run: cargo test --doc