-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (52 loc) · 1.41 KB
/
ci.yml
File metadata and controls
58 lines (52 loc) · 1.41 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
# Tier 1: Fast checks — runs on every push/PR (~30s)
lint-and-unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 22
cache: npm
- run: npm ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: npm run typecheck
- run: npm run lint
- run: npm run test:unit
# Tier 2: Integration tests — runs on main or manual trigger
integration:
if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch'
runs-on: macos-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 22
cache: npm
- run: npm ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Start dev server
run: |
npm run dev &
# Wait for MCP server to be ready
for i in $(seq 1 60); do
if curl -s http://127.0.0.1:7532/mcp > /dev/null 2>&1; then
echo "MCP server ready"
break
fi
sleep 1
done
- name: Run integration tests
run: npm run test:mcp
- name: Stop dev server
if: always()
run: pkill -f "electron-vite" || true