-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (91 loc) · 2.89 KB
/
Copy pathci.yml
File metadata and controls
113 lines (91 loc) · 2.89 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
# CI — L0 + L1 + L2 + L3 quality gates (docs/testing.md §4)
# Runs on every push to main and every pull request.
#
# Quality gates are paused — the release pipeline is the only automated
# workflow right now. Run manually via workflow_dispatch when needed.
name: CI
on:
workflow_dispatch:
# push:
# branches: [main]
# pull_request:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: L0-L3 quality gates
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache cargo
uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri
# System dependencies required to compile the Tauri Linux stack
# (glib/gtk/webkit2gtk-4.1 pulled in by tauri v2 + tray-icon).
# Without these, cargo clippy fails on glib-sys/pkg-config.
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
build-essential \
curl \
wget \
file \
libxdo-dev \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
patchelf
# L0 — TypeScript static checks
- name: L0 eslint
run: pnpm exec eslint . --max-warnings 0
- name: L0 prettier
run: pnpm exec prettier --check .
- name: L0 tsc
run: pnpm exec tsc -b
# L0 — Rust static checks
- name: L0 cargo fmt
working-directory: src-tauri
run: cargo fmt --check
- name: L0 cargo clippy
working-directory: src-tauri
run: cargo clippy --all-targets -- -D warnings
- name: L0 i18n keys
run: pnpm check:i18n
- name: L0 links
run: pnpm check:links
- name: L0 hardcoded strings
run: node scripts/check-hardcoded.mjs
# L1 — unit tests (vitest)
- name: L1 vitest
run: pnpm test
# L3 — contract tests against the Mock OpenCode Server
- name: L3 mock server self-test
run: pnpm mock:test
# Contract drift detection: schema.d.ts vs docs/openapi_v1.18.11.json
- name: gen:api drift check
run: pnpm gen:api:check
# Startup bundle size guard (docs/ui-audit-2026-08 §5): the vite
# startup chunk must stay inside its gzip budget.
- name: Bundle size guard
run: pnpm build && pnpm check:bundle