-
Notifications
You must be signed in to change notification settings - Fork 1
101 lines (77 loc) · 2.3 KB
/
ci.yml
File metadata and controls
101 lines (77 loc) · 2.3 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: CI
on:
push:
branches: [main, dev, release/*, feature/*]
pull_request:
branches: [main, dev, release/*]
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
rust:
name: Rust ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all -- --check
- name: Run clippy
run: cargo clippy --all-targets -- -D warnings
- name: Build CLI
run: cargo build --locked
- name: Run CLI unit tests
run: cargo test --locked --bin solverforge
- name: Run scaffold contract tests
run: cargo test --locked --test scaffold_test -- --nocapture --test-threads=1
integration:
name: Integration Tests
runs-on: ubuntu-latest
needs: [rust]
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install pre-commit
shell: bash
run: python -m pip install --upgrade pip pre-commit
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
cache-dependency-path: package-lock.json
- name: Install Node dependencies
run: npm ci
- name: Install Playwright Chromium
run: make install-e2e
- name: Run pre-commit
run: make pre-commit
- name: Run full integration validation
run: make test-full
- name: Upload integration artifacts on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: integration-test-artifacts
path: target/test-artifacts
if-no-files-found: ignore