@@ -14,47 +14,19 @@ jobs:
14
14
name : Tests pass
15
15
runs-on : ubuntu-latest
16
16
steps :
17
- - uses : actions/checkout@v2
18
- - name : Install stable Rust
19
- uses : actions-rs/toolchain@v1
20
- with :
21
- toolchain : stable
22
- profile : minimal
23
-
24
- - name : Get Cargo version
25
- id : cargo_version
26
- run : echo "::set-output name=version::$(cargo -V | tr -d ' ')"
27
- shell : bash
28
-
29
- - name : Download cache
30
- uses : actions/cache@v2
31
- with :
32
- path : |
33
- ~/.cargo/registry/index/
34
- ~/.cargo/registry/cache/
35
- ~/.cargo/git/db/
36
- target/
37
- key : ${{ runner.os }}-${{ steps.cargo_version.outputs.version }}-${{ hashFiles('Cargo.toml') }}
38
- restore-keys : ${{ runner.os }}-${{ steps.cargo_version.outputs.version }}
39
-
40
- - name : Build
41
- run : cargo build --verbose
42
-
43
- - name : Run tests
44
- run : cargo test --features=serde --verbose
17
+ - uses : actions/checkout@v4
18
+ - uses : dtolnay/rust-toolchain@stable
19
+ - run : cargo build --verbose
20
+ - run : cargo test --features=serde --verbose
45
21
46
22
clippy :
47
23
name : No warnings from Clippy
48
24
runs-on : ubuntu-latest
49
25
steps :
50
- - uses : actions/checkout@v2
51
- - name : Install stable Rust
52
- uses : actions-rs/toolchain@v1
26
+ - uses : actions/checkout@v4
27
+ - uses : dtolnay/rust-toolchain@stable
53
28
with :
54
- toolchain : stable
55
- profile : minimal
56
29
components : clippy
57
-
58
30
- name : Check Clippy lints
59
31
env :
60
32
RUSTFLAGS : -D warnings
@@ -64,38 +36,18 @@ jobs:
64
36
name : Source code is formatted
65
37
runs-on : ubuntu-latest
66
38
steps :
67
- - uses : actions/checkout@v2
68
- - name : Install stable Rust
69
- uses : actions-rs/toolchain@v1
39
+ - uses : actions/checkout@v4
40
+ - uses : dtolnay/rust-toolchain@stable
70
41
with :
71
- toolchain : stable
72
- profile : minimal
73
42
components : rustfmt
74
-
75
- - name : Check formatting
76
- run : cargo fmt --all -- --check
43
+ - run : cargo fmt --all -- --check
77
44
78
45
check_documentation :
79
46
name : Documentation builds successfully
80
47
runs-on : ubuntu-latest
81
48
steps :
82
- - uses : actions/checkout@v2
83
- - name : Install nightly Rust
84
- uses : actions-rs/toolchain@v1
85
- with :
86
- toolchain : nightly
87
- profile : minimal
88
-
89
- - name : Download cache
90
- uses : actions/cache@v2
91
- with :
92
- path : |
93
- ~/.cargo/registry/index/
94
- ~/.cargo/registry/cache/
95
- ~/.cargo/git/db/
96
- target/
97
- key : documentation
98
-
49
+ - uses : actions/checkout@v4
50
+ - uses : dtolnay/rust-toolchain@nightly
99
51
- name : Check documentation
100
52
env :
101
53
RUSTDOCFLAGS : -D warnings
0 commit comments