@@ -13,8 +13,8 @@ concurrency:
13
13
cancel-in-progress : true
14
14
15
15
jobs :
16
- code_quality_and_tests :
17
- name : Code Quality & Tests
16
+ code_quality :
17
+ name : Code Quality (fmt + clippy)
18
18
runs-on : ubuntu-latest
19
19
steps :
20
20
- name : Checkout Code
@@ -47,32 +47,43 @@ jobs:
47
47
with :
48
48
components : clippy, rustfmt
49
49
50
- - name : Code Quality Checks
50
+ - name : Run fmt & clippy
51
51
run : |
52
52
cargo fmt -- --check
53
53
cargo clippy --all-targets --all-features -- -D warnings
54
54
55
+ tests :
56
+ name : Tests (with coverage)
57
+ runs-on : ubuntu-latest
58
+ steps :
59
+ - name : Checkout Code
60
+ uses : actions/checkout@v4
61
+
62
+ - name : Cache Rust Dependencies
63
+ uses : actions/cache@v3
64
+ with :
65
+ path : |
66
+ ~/.cargo/registry
67
+ ~/.cargo/git
68
+ target
69
+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
70
+ restore-keys : |
71
+ ${{ runner.os }}-cargo-
72
+
73
+ - name : Set up Rust
74
+ uses : dtolnay/rust-toolchain@stable
75
+ with :
76
+ components : clippy, rustfmt
77
+
55
78
- name : Install cargo-tarpaulin
56
79
uses : baptiste0928/cargo-install@v3
57
80
with :
58
81
crate : cargo-tarpaulin
59
82
60
- - name : Run Tests
83
+ - name : Run Tests with Coverage
61
84
run : |
62
85
cargo tarpaulin --out Xml --output-dir coverage.xml
63
86
64
- - name : Run Battle Tests
65
- run : |
66
- chmod +x tests/battle_test/battle_testing.sh
67
- ./tests/battle_test/battle_testing.sh
68
-
69
- - name : Upload Format Error Logs
70
- if : failure()
71
- uses : actions/upload-artifact@v3
72
- with :
73
- name : format-error-logs
74
- path : tests/battle_test/format_errors.log
75
-
76
87
- name : Upload Coverage Report
77
88
uses : actions/upload-artifact@v4
78
89
with :
84
95
with :
85
96
token : ${{ secrets.CODECOV_TOKEN }}
86
97
98
+ battle_test :
99
+ name : Battle Tests
100
+ runs-on : ubuntu-latest
101
+ steps :
102
+ - name : Checkout Code
103
+ uses : actions/checkout@v4
104
+
105
+ - name : Cache Rust Dependencies
106
+ uses : actions/cache@v3
107
+ with :
108
+ path : |
109
+ ~/.cargo/registry
110
+ ~/.cargo/git
111
+ target
112
+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
113
+ restore-keys : |
114
+ ${{ runner.os }}-cargo-
115
+
116
+ - name : Set up Rust
117
+ uses : dtolnay/rust-toolchain@stable
118
+
119
+ - name : Run Battle Tests
120
+ run : |
121
+ chmod +x tests/battle_test/battle_testing.sh
122
+ ./tests/battle_test/battle_testing.sh
123
+
124
+ - name : Upload Battle Test Logs
125
+ if : failure()
126
+ uses : actions/upload-artifact@v3
127
+ with :
128
+ name : format-error-logs
129
+ path : tests/battle_test/format_errors.log
130
+
87
131
audit :
88
132
name : Security Audit
89
133
runs-on : ubuntu-latest
0 commit comments