Repository navigation
77 lines (71 loc) · 2.45 KB
/
Copy pathdreamcode-ci.yml
File metadata and controls
77 lines (71 loc) · 2.45 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
name: Dreamcode CI
on:
push:
branches: [stable-release, dev]
pull_request:
workflow_dispatch:
env:
CI: true
OPENCODE_DISABLE_SHARE: 1
jobs:
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install --frozen-lockfile
# Scope typecheck to packages/opencode only — the server (packages/cli)
# has pre-existing Effect-TS v4 HttpApi error-type incompatibilities
# that are unrelated to dreamcode changes.
- name: Typecheck
run: bun run --cwd packages/opencode typecheck
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install --frozen-lockfile
- name: Run unit tests (skill package)
run: bun test test/skill/ --timeout 30000
working-directory: packages/opencode
integration-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install --frozen-lockfile
- name: Run integration tests (sensor gate)
run: bun test test/skill/sensor-gate.integration.test.ts --timeout 30000
working-directory: packages/opencode
- name: Run integration tests (token predictor)
run: bun test test/skill/token-predictor.integration.test.ts --timeout 30000
working-directory: packages/opencode
build:
runs-on: ubuntu-latest
needs: [typecheck, unit-tests, integration-tests]
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install --frozen-lockfile
- name: Build dreamcode binary
run: bun run packages/opencode/script/build.ts
- name: Binary smoke test
run: |
chmod +x packages/opencode/dist/dreamcode-linux-x64/bin/dreamcode
packages/opencode/dist/dreamcode-linux-x64/bin/dreamcode --version
packages/opencode/dist/dreamcode-linux-x64/bin/dreamcode --help
- name: Binary regression tests
run: bun test test/build/binary-regression.test.ts --timeout 30000
working-directory: packages/opencode
- uses: actions/upload-artifact@v4
with:
name: dreamcode-linux-x64
path: packages/opencode/dist/dreamcode-linux-x64/