@@ -99,10 +99,48 @@ jobs:
9999 restore-keys : |
100100 ${{ runner.os }}-cargo-test-
101101 ${{ runner.os }}-cargo-
102-
102+
103103 - name : Run unit tests
104104 run : cargo test --workspace --exclude e2e-tests --verbose
105105
106+ coverage :
107+ name : Contract Coverage Gate
108+ runs-on : ubuntu-latest
109+ steps :
110+ - uses : actions/checkout@v4
111+
112+ - name : Install Rust toolchain
113+ uses : dtolnay/rust-toolchain@stable
114+ with :
115+ components : llvm-tools-preview
116+
117+ - name : Cache cargo registry
118+ uses : actions/cache@v4
119+ with :
120+ path : |
121+ ~/.cargo/registry
122+ ~/.cargo/git
123+ target
124+ key : ${{ runner.os }}-cargo-coverage-${{ hashFiles('**/Cargo.lock') }}
125+ restore-keys : |
126+ ${{ runner.os }}-cargo-coverage-
127+ ${{ runner.os }}-cargo-
128+
129+ - name : Install cargo-llvm-cov
130+ uses : taiki-e/install-action@cargo-llvm-cov
131+
132+ - name : Run 95% coverage gate
133+ run : ./scripts/test-coverage.sh --gate 95 --lcov
134+
135+ - name : Upload coverage reports
136+ uses : actions/upload-artifact@v4
137+ if : always()
138+ with :
139+ name : contract-coverage
140+ path : |
141+ target/coverage/
142+ target/coverage-reports/
143+
106144 performance :
107145 name : Performance Regression
108146 runs-on : ubuntu-latest
@@ -124,6 +162,47 @@ jobs:
124162 name : perf-report
125163 path : target/perf_report.json
126164
165+ load-testing :
166+ name : Load Testing
167+ runs-on : ubuntu-latest
168+ env :
169+ STRELLER_PEAK_LOAD : 5
170+ STRELLER_LOAD_MULTIPLIER : 10
171+ STRELLER_STUDENT_POOL : 20
172+ STRELLER_COURSE_COUNT : 4
173+ STRELLER_READ_MULTIPLIER : 2
174+ steps :
175+ - uses : actions/checkout@v4
176+
177+ - name : Install Rust toolchain
178+ uses : dtolnay/rust-toolchain@stable
179+
180+ - name : Cache cargo registry
181+ uses : actions/cache@v4
182+ with :
183+ path : |
184+ ~/.cargo/registry
185+ ~/.cargo/git
186+ target
187+ key : ${{ runner.os }}-cargo-load-${{ hashFiles('**/Cargo.lock') }}
188+ restore-keys : |
189+ ${{ runner.os }}-cargo-load-
190+ ${{ runner.os }}-cargo-
191+
192+ - name : Make scripts executable
193+ run : chmod +x scripts/*.sh
194+
195+ - name : Run bounded load test suite
196+ run : ./scripts/load_test.sh --ci --report target/load-test-report.json --summary target/load-test-summary.md
197+
198+ - name : Upload load test artifacts
199+ uses : actions/upload-artifact@v4
200+ with :
201+ name : load-test-report
202+ path : |
203+ target/load-test-report.json
204+ target/load-test-summary.md
205+
127206 visual-regression :
128207 name : Visual Regression
129208 runs-on : ubuntu-latest
@@ -132,7 +211,7 @@ jobs:
132211 - uses : actions/checkout@v4
133212
134213 - name : Setup Node.js
135- uses : actions/setup-node@v4
214+ uses : actions/setup-node@v6
136215 with :
137216 node-version : " 20"
138217 cache : " npm"
@@ -143,9 +222,6 @@ jobs:
143222 - name : Install Playwright browsers
144223 run : npx playwright install --with-deps
145224
146- - name : Generate visual baselines in CI
147- run : npm run visual:test:update
148-
149225 - name : Run visual regression tests
150226 run : npm run visual:test
151227
@@ -159,10 +235,41 @@ jobs:
159235 visual-tests/test-results
160236 visual-tests/tests/__screenshots__
161237
238+ accessibility :
239+ name : Accessibility (WCAG AA)
240+ runs-on : ubuntu-latest
241+ timeout-minutes : 15
242+ steps :
243+ - uses : actions/checkout@v4
244+
245+ - name : Setup Node.js
246+ uses : actions/setup-node@v4
247+ with :
248+ node-version : " 20"
249+ cache : " npm"
250+
251+ - name : Install dependencies
252+ run : npm ci
253+
254+ - name : Install Playwright browsers
255+ run : npx playwright install chromium --with-deps
256+
257+ - name : Run accessibility tests
258+ run : npm run a11y:test
259+
260+ - name : Upload accessibility report
261+ if : always()
262+ uses : actions/upload-artifact@v4
263+ with :
264+ name : accessibility-report
265+ path : |
266+ visual-tests/accessibility-report/
267+ visual-tests/accessibility-reports/
268+
162269 ci-success :
163270 name : CI Success
164271 runs-on : ubuntu-latest
165- needs : [format, clippy, build, test, performance, visual-regression]
272+ needs : [format, clippy, build, test, coverage, performance, visual-regression]
166273 if : always()
167274 steps :
168275 - name : Check all jobs
@@ -171,15 +278,20 @@ jobs:
171278 "${{ needs.clippy.result }}" != "success" || \
172279 "${{ needs.build.result }}" != "success" || \
173280 "${{ needs.test.result }}" != "success" || \
281+ "${{ needs.coverage.result }}" != "success" || \
174282 "${{ needs.performance.result }}" != "success" || \
175- "${{ needs.visual-regression.result }}" != "success" ]]; then
283+ "${{ needs.visual-regression.result }}" != "success" || \
284+ "${{ needs.accessibility.result }}" != "success" ]]; then
176285 echo "One or more CI jobs failed"
177286 echo "Format: ${{ needs.format.result }}"
178287 echo "Clippy: ${{ needs.clippy.result }}"
179288 echo "Build: ${{ needs.build.result }}"
180289 echo "Test: ${{ needs.test.result }}"
290+ echo "Coverage: ${{ needs.coverage.result }}"
181291 echo "Performance: ${{ needs.performance.result }}"
292+ echo "Load Testing: ${{ needs.load-testing.result }}"
182293 echo "Visual Regression: ${{ needs.visual-regression.result }}"
294+ echo "Accessibility: ${{ needs.accessibility.result }}"
183295 exit 1
184296 fi
185297 echo "✅ All CI jobs passed successfully"
0 commit comments