-
Notifications
You must be signed in to change notification settings - Fork 0
170 lines (138 loc) · 4.99 KB
/
Copy pathci.yml
File metadata and controls
170 lines (138 loc) · 4.99 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
permissions:
contents: read
jobs:
matrix-rust:
name: Matrix Rust (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@387aeee55b189f024a4f6d94890c5b18d73339cc # 1.92.0
with:
components: clippy, rustfmt
- name: Install system dependencies (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
libssl-dev \
libsqlcipher-dev
- name: Cache cargo registry & build
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: |
~/.cargo/registry
~/.cargo/git
mesh/src-tauri/target
key: ${{ runner.os }}-cargo-matrix-${{ hashFiles('mesh/src-tauri/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-matrix-
- name: Check Matrix backend
working-directory: mesh/src-tauri
run: cargo check --no-default-features --features matrix-backend --locked
- name: Lint Matrix backend and tests
working-directory: mesh/src-tauri
run: cargo clippy --no-default-features --features matrix-backend --all-targets --locked -- -D warnings
- name: Check Rust formatting
working-directory: mesh/src-tauri
run: cargo fmt --check
- name: Check generated TypeScript IPC DTOs
working-directory: mesh
run: npm run check:ipc-types
- name: Test Matrix backend
working-directory: mesh/src-tauri
run: cargo test --no-default-features --features matrix-backend --locked --jobs 1
legacy-rust:
name: Legacy LAN Rust
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@387aeee55b189f024a4f6d94890c5b18d73339cc # 1.92.0
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
libssl-dev \
libsqlcipher-dev
- name: Cache cargo registry & legacy build
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: |
~/.cargo/registry
~/.cargo/git
mesh/src-tauri/target
key: ${{ runner.os }}-cargo-legacy-${{ hashFiles('mesh/src-tauri/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-legacy-
- name: Check legacy LAN backend
working-directory: mesh/src-tauri
run: cargo check --no-default-features --features legacy-p2p --locked
- name: Test legacy LAN backend
working-directory: mesh/src-tauri
run: cargo test --no-default-features --features legacy-p2p --locked --jobs 1
check-frontend:
name: Frontend Build & Browser E2E
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
cache: npm
cache-dependency-path: mesh/package-lock.json
- name: Install dependencies
working-directory: mesh
run: npm ci
- name: TypeScript check
working-directory: mesh
run: npx tsc --noEmit
- name: Lint React compiler and Zustand selector contracts
working-directory: mesh
run: npm run lint
- name: Check Tauri IPC command contract
working-directory: mesh
run: npm run check:ipc-contract
- name: Check documented security invariant symbols
working-directory: mesh
run: npm run check:security-invariants
- name: Check design token source of truth
working-directory: mesh
run: npm run check:design-tokens
- name: Check icon source of truth
working-directory: mesh
run: npm run check:icons
- name: Run tests
working-directory: mesh
run: npm run test
- name: Build frontend
working-directory: mesh
run: npm run build
- name: Enforce frontend entry bundle budget
working-directory: mesh
run: npm run check:bundle-size
- name: Install Playwright browser
working-directory: mesh
run: npm run e2e:install -- --with-deps
- name: Run browser E2E tests and WCAG scans
working-directory: mesh
run: npm run e2e