-
Notifications
You must be signed in to change notification settings - Fork 1k
103 lines (96 loc) · 3.83 KB
/
Copy pathci.yml
File metadata and controls
103 lines (96 loc) · 3.83 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Minimal token scope — all jobs only checkout, install, build, and test.
# None of them push code, comment on PRs, or call mutating GitHub APIs.
permissions:
contents: read
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: pnpm/action-setup@7088e561eb65bb68695d245aa206f005ef30921d
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: 20
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm lint
typecheck:
name: Typecheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: pnpm/action-setup@7088e561eb65bb68695d245aa206f005ef30921d
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: 20
cache: pnpm
- run: pnpm install --frozen-lockfile
# Build all non-web packages
- run: pnpm -r --filter "!@aoagents/ao-web" build
# Typecheck all non-web packages
- run: pnpm -r --filter "!@aoagents/ao-web" typecheck
# Build web (Next.js build includes its own typecheck)
- run: pnpm --filter @aoagents/ao-web build
test:
name: Test (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: pnpm/action-setup@7088e561eb65bb68695d245aa206f005ef30921d
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: 20
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm -r --filter "!@aoagents/ao-web" build
# Verify node-pty's Windows prebuild loads cleanly before any test that
# depends on it. A broken prebuild fails this step in seconds with a
# clear "node-pty" stack rather than a buried integration-test failure.
- name: Verify node-pty prebuild (Windows)
if: runner.os == 'Windows'
working-directory: packages/plugins/runtime-process
run: node -e "const p=require('node-pty');const t=p.spawn('cmd.exe',['/c','exit'],{cols:80,rows:24});t.onExit(({exitCode})=>process.exit(exitCode));setTimeout(()=>process.exit(2),5000)"
- run: pnpm test
test-web:
name: Test Web (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: pnpm/action-setup@7088e561eb65bb68695d245aa206f005ef30921d
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: 20
cache: pnpm
# tmux is the Linux/macOS terminal runtime backing direct-terminal-ws
# integration tests. Windows uses runtime-process + named pipes (covered
# by mux-websocket-windows.test.ts) — those tmux tests self-skip.
- name: Install tmux
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y tmux
- name: Start tmux server
if: runner.os == 'Linux'
run: tmux start-server
- run: pnpm install --frozen-lockfile
- run: pnpm -r --filter "!@aoagents/ao-web" build
# Full web suite — components, hooks, libs, app routes, and server tests.
# Previously this job was scoped to server/__tests__/ only; broadening it
# closes a long-standing coverage gap on both Linux and Windows.
- run: pnpm --filter @aoagents/ao-web test