66 pull_request :
77 branches : [ master ]
88
9+ env :
10+ CARGO_INCREMENTAL : 0
11+ RUSTFLAGS : " -Dwarnings"
12+
913jobs :
14+ clippy :
15+ runs-on : ubuntu-latest
16+ steps :
17+ - uses : actions/checkout@v4
18+ - name : Install Rust stable with clippy
19+ uses : dtolnay/rust-toolchain@stable
20+ with :
21+ components : clippy
22+
23+ - name : Run cargo clippy
24+ run : cargo clippy --all-targets
25+
26+ fmt :
27+ runs-on : ubuntu-latest
28+ steps :
29+ - uses : actions/checkout@v4
30+ - name : Install Rust nightly with rustfmt
31+ uses : dtolnay/rust-toolchain@nightly
32+ with :
33+ components : rustfmt
34+
35+ - name : Run rustfmt --check
36+ run : cargo fmt -- --check
37+
1038 test :
11- name : Test
39+ needs : [clippy, fmt]
1240 runs-on : ${{ matrix.os }}
1341 strategy :
14- fail-fast : false
1542 matrix :
16- include :
17- - os : ubuntu-latest
18- target : x86_64-unknown-linux-gnu
19- toolchain : stable
20- - os : ubuntu-latest
21- target : x86_64-unknown-linux-gnu
22- toolchain : nightly
43+ os : [ubuntu-latest, macos-latest, windows-latest]
44+ toolchain : [stable, nightly]
45+
2346 steps :
24- - uses : actions/checkout@v2
25- - name : Install toolchain
26- uses : actions-rs/ toolchain@v1
47+ - uses : actions/checkout@v4
48+ - name : Install Rust ${{ matrix. toolchain }}
49+ uses : dtolnay/rust- toolchain@master
2750 with :
28- profile : minimal
29- target : ${{ matrix.target }}
3051 toolchain : ${{ matrix.toolchain }}
31- override : true
32- - name : Test nightly feature (if possible)
33- if : ${{ matrix.toolchain == 'nightly' }}
34- run : |
35- cargo test --target ${{ matrix.target }} --features=nightly
36- cargo test --target ${{ matrix.target }} --benches --features=nightly
52+
53+ - name : Test nightly feature
54+ if : matrix.toolchain == 'nightly'
55+ run : cargo test --all-targets --features=nightly
56+
3757 - name : Test default features
38- run : |
39- cargo test --target ${{ matrix.target }}
58+ if : matrix.toolchain != 'nightly'
59+ run : cargo test --all-targets
60+
0 commit comments