File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on :
4
+ push :
5
+ branches : [ "main" ]
6
+ pull_request :
7
+ branches : [ "main" ]
8
+ schedule :
9
+ - cron : ' 30 2 * * *'
10
+
11
+ env :
12
+ CARGO_TERM_COLOR : always
13
+
14
+ jobs :
15
+ build :
16
+ runs-on : ubuntu-latest
17
+ name : Build & Test Project
18
+
19
+ steps :
20
+ - name : Checkout source
21
+ uses : actions/checkout@v4
22
+
23
+ - name : Install Rust
24
+ uses : dtolnay/rust-toolchain@stable
25
+ with :
26
+ components : rustfmt, clippy
27
+
28
+ - name : Check Formatting
29
+ run : cargo fmt --all -- --check
30
+
31
+ - name : Cargo Cache
32
+ uses : actions/cache@v3
33
+ with :
34
+ path : |
35
+ ~/.cargo/registry/index/
36
+ ~/.cargo/registry/cache/
37
+ target/
38
+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
39
+
40
+ - name : Build project
41
+ run : cargo build
42
+
43
+ - name : Test project
44
+ run : cargo test --all
45
+
46
+ - name : Run clippy
47
+ uses : giraffate/clippy-action@v1
48
+ with :
49
+ reporter : ' github-pr-check'
50
+ clippy_flags : --no-deps
51
+ filter_mode : nofilter
52
+ github_token : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments