-
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (37 loc) · 1.09 KB
/
build.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
51
name: Build
on: [push]
# Stops the running workflow of previous pushes
concurrency:
# cancel per workflow
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-and-docs:
name: Lints and check docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Rust setup (nightly) for docs
uses: dtolnay/rust-toolchain@nightly
with:
components: rust-docs, clippy, rustfmt
- name: Lint - rustfmt
run: cargo fmt --all -- --check
- name: Lint - clippy
run: cargo clippy --all --no-deps -- -D warnings
- name: Docs
env:
RUSTDOCFLAGS: -D warnings --cfg docsrs
run: cargo doc --no-deps --all-features
check-and-test:
name: Cargo check and test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Rust setup (stable)
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo check --all-features
- run: cargo test --all-features