-
Notifications
You must be signed in to change notification settings - Fork 101
57 lines (45 loc) · 1.47 KB
/
regression.yml
File metadata and controls
57 lines (45 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Regression Testing
on:
push:
pull_request:
jobs:
test:
name: Tests & Regression Detection
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
targets: wasm32-unknown-unknown
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Run unit tests
run: cargo test --workspace --lib 2>&1 | tee test_output.txt
- name: Run integration tests
run: cargo test --workspace --tests 2>&1 | tee -a test_output.txt
- name: Run gas benchmarks
run: |
cargo test --release -p teachlink-contract --test test_gas_benchmarks -- --nocapture \
2>&1 | tee gas_output.txt
- name: Check performance regressions
run: bash scripts/check_performance.sh
- name: Enforce performance budgets
if: always()
run: bash scripts/enforce_budgets.sh --verbose
- name: Generate test report
if: always()
run: bash scripts/generate_test_report.sh
- name: Upload test report
if: always()
uses: actions/upload-artifact@v7
with:
name: test-report-${{ github.sha }}
path: reports/
- name: Post report summary
if: always()
run: |
if [ -f reports/summary.md ]; then
cat reports/summary.md >> $GITHUB_STEP_SUMMARY
fi