forked from ParkMyCar/compact_str
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (55 loc) · 1.7 KB
/
clippy.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
name: Clippy
env:
CARGO_TERM_COLOR: "always"
RUSTFLAGS: "-D warnings"
jobs:
fmt:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Checkout compact_str
- name: Install toolchain
run: |
rustup toolchain install nightly --no-self-update --profile minimal --component rustfmt
rustup override set nightly
- name: Run rustfmt Workspace
run: cargo fmt --all -- --check
- name: Run rustfmt compact_str
run: cargo fmt --all --manifest-path compact_str/Cargo.toml -- --check
clippy:
name: cargo clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Checkout compact_str
- name: Install toolchain
run: |
rustup toolchain install nightly --no-self-update --profile minimal --component clippy
rustup override set nightly
- uses: Swatinem/rust-cache@v2
- name: Run clippy Workspace
run: cargo clippy --no-deps --tests
- name: Run clippy compact_str
run: cargo clippy --no-deps --tests --manifest-path compact_str/Cargo.toml
doc:
name: cargo doc
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: "-D warnings --cfg docsrs"
steps:
- uses: actions/checkout@v4
name: Checkout compact_str
- name: Install toolchain
run: |
rustup toolchain install nightly --no-self-update --profile minimal
rustup override set nightly
- uses: Swatinem/rust-cache@v2
- name: Run rustdoc
run: cargo doc --all-features --no-deps --manifest-path compact_str/Cargo.toml