File tree 1 file changed +56
-0
lines changed 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and Test
2
+
3
+ on :
4
+ push :
5
+ branches : [ "main" ]
6
+ pull_request :
7
+ branches : [ "main" ]
8
+
9
+ jobs :
10
+ build :
11
+ name : Build and Test
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - name : Checkout repository
15
+ uses : actions/checkout@v4
16
+
17
+ - name : Install Rust toolchain
18
+ uses : dtolnay/rust-toolchain@stable
19
+
20
+ - name : Cache dependencies
21
+ uses : Swatinem/rust-cache@v2
22
+
23
+ - name : Check formatting
24
+ run : cargo fmt --check
25
+
26
+ - name : Run clippy
27
+ run : cargo clippy -- -D warnings
28
+
29
+ - name : Build
30
+ run : cargo build --verbose
31
+
32
+ - name : Run tests
33
+ run : cargo test --verbose
34
+
35
+ # Test on multiple platforms
36
+ platform-tests :
37
+ name : Test on ${{ matrix.os }}
38
+ runs-on : ${{ matrix.os }}
39
+ strategy :
40
+ matrix :
41
+ os : [windows-latest, macos-latest]
42
+ steps :
43
+ - name : Checkout repository
44
+ uses : actions/checkout@v4
45
+
46
+ - name : Install Rust toolchain
47
+ uses : dtolnay/rust-toolchain@stable
48
+
49
+ - name : Cache dependencies
50
+ uses : Swatinem/rust-cache@v2
51
+
52
+ - name : Build
53
+ run : cargo build --verbose
54
+
55
+ - name : Run tests
56
+ run : cargo test --verbose
You can’t perform that action at this time.
0 commit comments