File tree Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Clippy Test
2
+
3
+ on :
4
+ pull_request :
5
+
6
+
7
+ jobs :
8
+ git-diff :
9
+ runs-on : ubuntu-latest
10
+ name : ' Git Diff - Powered by Rust'
11
+ outputs :
12
+ DIFF_FILES : ${{ steps.git-diff.outputs.DIFF_FILES }}
13
+ DIFF_COUNT : ${{ steps.git-diff.outputs.DIFF_COUNT }}
14
+ steps :
15
+ - uses : actions/checkout@v4
16
+ -
uses :
LuisLiraC/[email protected]
17
+ id : git-diff
18
+ with :
19
+ patterns : ' *.rs'
20
+
21
+ clippy-test :
22
+ runs-on : ubuntu-latest
23
+ needs : [git-diff]
24
+ if : ${{ needs.git-diff.outputs.DIFF_COUNT != 0 }}
25
+ name : Run Tests
26
+ steps :
27
+ - uses : actions/checkout@v4
28
+
29
+ - name : Cache cargo registry
30
+ uses : actions/cache@v4
31
+ with :
32
+ path : ~/.cargo/registry
33
+ key : ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
34
+ restore-keys : |
35
+ ${{ runner.os }}-cargo-registry-
36
+
37
+ - name : Cache cargo index
38
+ uses : actions/cache@v4
39
+ with :
40
+ path : ~/.cargo/git
41
+ key : ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
42
+ restore-keys : |
43
+ ${{ runner.os }}-cargo-index-
44
+
45
+ - name : Cache cargo build
46
+ uses : actions/cache@v4
47
+ with :
48
+ path : target
49
+ key : ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
50
+ restore-keys : |
51
+ ${{ runner.os }}-cargo-build-
52
+
53
+ - name : Run Tests
54
+ run : cargo clippy --color always -- -Dwarnings -W clippy::pedantic
You can’t perform that action at this time.
0 commit comments