Skip to content

Commit 722890f

Browse files
committed
More workflow stuff
1 parent 4019976 commit 722890f

File tree

1 file changed

+9
-28
lines changed

1 file changed

+9
-28
lines changed

.github/workflows/rust.yml

+9-28
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ on:
1010
env:
1111
CARGO_TERM_COLOR: always
1212

13-
14-
1513
jobs:
1614
format:
1715
name: Check code formatting
@@ -20,16 +18,6 @@ jobs:
2018
- name: Checkout repository
2119
uses: actions/checkout@v4
2220

23-
- name: Restore cargo cache
24-
uses: actions/cache@v3
25-
with:
26-
path: |
27-
~/.cargo/registry
28-
~/.cargo/git
29-
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
30-
restore-keys: |
31-
${{ runner.os }}-cargo-
32-
3321
- name: Install Rust nightly
3422
uses: dtolnay/rust-toolchain@nightly
3523

@@ -59,8 +47,11 @@ jobs:
5947
- name: Install Rust nightly
6048
uses: dtolnay/rust-toolchain@nightly
6149

50+
- name: Install clippy
51+
run: rustup component add clippy
52+
6253
- name: Run Clippy
63-
run: cargo clippy -- -Dwarnings -Dclippy::all
54+
run: cargo clippy --all-targets -- -Dwarnings
6455

6556
security:
6657
name: Check for security vulnerabilities
@@ -69,24 +60,14 @@ jobs:
6960
- name: Checkout repository
7061
uses: actions/checkout@v4
7162

72-
- name: Restore cargo cache
73-
uses: actions/cache@v3
74-
with:
75-
path: |
76-
~/.cargo/registry
77-
~/.cargo/git
78-
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
79-
restore-keys: |
80-
${{ runner.os }}-cargo-
81-
8263
- name: Install Rust nightly
8364
uses: dtolnay/rust-toolchain@nightly
8465

85-
- name: Install cargo-audit
66+
- name: Install audit
8667
run: cargo install cargo-audit
8768

8869
- name: Run cargo audit
89-
run: cargo audit
70+
run: cargo install cargo-audit && cargo audit
9071

9172
build:
9273
name: Build project
@@ -105,7 +86,7 @@ jobs:
10586
- name: Checkout repository
10687
uses: actions/checkout@v4
10788

108-
- name: Restore cargo and target cache
89+
- name: Cache dependencies
10990
uses: actions/cache@v3
11091
with:
11192
path: |
@@ -141,7 +122,7 @@ jobs:
141122
- name: Checkout repository
142123
uses: actions/checkout@v4
143124

144-
- name: Restore cargo and target cache
125+
- name: Cache dependencies
145126
uses: actions/cache@v3
146127
with:
147128
path: |
@@ -158,4 +139,4 @@ jobs:
158139
targets: ${{ matrix.target }}
159140

160141
- name: Run tests
161-
run: cargo test --target ${{ matrix.target }} --verbose
142+
run: cargo test --target ${{ matrix.target }} --verbose

0 commit comments

Comments
 (0)