-
Notifications
You must be signed in to change notification settings - Fork 17
81 lines (62 loc) · 2.11 KB
/
check-and-lint.yaml
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
on:
pull_request:
push:
branches:
- master
name: Check and Lint
jobs:
windows:
name: Tests on windows
runs-on: windows-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Tests
run: cargo test -p bpaf -p bpaf_derive --all-targets --all-features --no-fail-fast
linux:
name: Tests, formatting and clippy on linux
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: -Dwarnings
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt clippy
- name: clippy minimal features
run: cargo clippy --workspace --all-targets --no-default-features
- name: clippy default features
run: cargo clippy --workspace --all-targets
- name: clippy all features
run: cargo clippy --workspace --all-targets --all-features
- name: test minimal features
run: cargo test -p bpaf -p bpaf_derive --all-targets --no-default-features --no-fail-fast
- name: test default features
run: cargo test -p bpaf -p bpaf_derive --all-targets --no-fail-fast
- name: test all features
run: cargo test -p bpaf -p bpaf_derive --all-targets --all-features --no-fail-fast
- name: Example documentation
run: cargo build --all-features -p docs2 && git diff && git diff-index --quiet HEAD --
- name: Rustdoc
run: cargo doc --all --no-deps --all-features
- name: formatting
run: cargo fmt --all -- --check
compat:
name: Tests on linux with 1.56 toolchain
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.56
- name: test minimal features
run: cargo run --manifest-path legacy/Cargo.toml -- --help