-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
159 lines (151 loc) · 5.84 KB
/
Copy pathengine-ci.yml
File metadata and controls
159 lines (151 loc) · 5.84 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
name: engine-ci
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
go:
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
with:
go-version-file: go.mod
- run: go build ./...
- run: go vet ./...
- run: go test ./...
typescript:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
with:
go-version-file: go.mod
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
cache: pnpm
# Ubuntu 23.10+ runners restrict unprivileged user namespaces via
# AppArmor; the agent sandbox tests exercise the real userns sandbox.
- name: Allow unprivileged user namespaces for sandbox tests
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
# The CLI conformance suite needs the real proxy; building it here with
# the cached Go toolchain keeps the test inside its 90s budget.
- name: Prebuild caveman-proxy for conformance tests
run: go build -o "$RUNNER_TEMP/caveman-proxy" ./proxy/cmd/caveman-proxy
- run: pnpm install --frozen-lockfile
- run: pnpm -r build
- run: pnpm -r test
env:
CAVEMAN_TEST_PROXY_BIN: ${{ runner.temp }}/caveman-proxy
python:
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.13"
- run: python -m pip install pytest
- run: python -m pytest -q
working-directory: packages/sdk/python
root-surfaces:
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.13"
- run: python -m pip install pytest==9.0.3
- run: npm test
- run: node --test --test-force-exit tests/*.js
- run: python -m unittest discover -s tests -p 'test_*.py'
env:
XDG_DATA_HOME: ${{ runner.temp }}/caveman-xdg
- run: python -m pytest -q tests
working-directory: mem/py
- run: python tests/verify_repo.py
extension:
runs-on: ubuntu-latest
timeout-minutes: 25
defaults:
run:
working-directory: extension
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
cache: npm
cache-dependency-path: extension/package-lock.json
- run: npm ci
- run: npx playwright install --with-deps chromium
- run: npm run package
windows:
runs-on: windows-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
with:
go-version-file: go.mod
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
cache: pnpm
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.13"
- run: pnpm install --frozen-lockfile
- run: python -m pip install pytest==9.0.3
- run: go test ./...
- run: npm test
- name: Prebuild caveman-proxy for conformance tests
run: go build -o "$env:RUNNER_TEMP\caveman-proxy.exe" ./proxy/cmd/caveman-proxy
- run: pnpm -r build
# Two POSIX-harnessed suites have never executed on Windows and are
# excluded until their harnesses are ported, not because coverage is
# unwanted: @caveman-ai/cli (149 failures — shebang-script stub agent
# binaries; Windows contracts run in the curated `npm run test:windows`
# gate below via windows-platform/portable-command/delegate-windows) and
# @caveman-ai/agent (42 failures — historical copy, source of truth is
# caveman-agent-sdk; its Windows contracts are windows-process and
# windows-shell-smoke in the same gate). Every other workspace suite
# passes on Windows and stays in.
- run: pnpm -r --filter "!@caveman-ai/cli" --filter "!@caveman-ai/agent" test
env:
CAVEMAN_TEST_PROXY_BIN: ${{ runner.temp }}\caveman-proxy.exe
- run: node --test --test-force-exit tests/*.js
- run: python -m unittest discover -s tests -p 'test_*.py'
env:
LOCALAPPDATA: ${{ runner.temp }}\caveman-data
- run: python -m pytest -q tests
working-directory: mem/py
- run: python -m pytest -q
working-directory: packages/sdk/python
- run: python tests/verify_repo.py
- run: npm --prefix extension ci
- run: npm --prefix extension test
- run: npm run test:windows