-
Notifications
You must be signed in to change notification settings - Fork 0
117 lines (110 loc) · 3.41 KB
/
Copy pathci.yml
File metadata and controls
117 lines (110 loc) · 3.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
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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
schedule:
- cron: '0 6 * * *' # Daily at 6 AM UTC
env:
BUN_VERSION: "1.2"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
static-check:
name: Static checks
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- uses: actions/checkout@v7
- uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ env.BUN_VERSION }}
no-cache: false
- run: bun install --frozen-lockfile
- name: Run test-health
run: bash scripts/test-health.sh
- name: Check whitespace
run: git diff --check
- name: Biome lint
run: bunx @biomejs/biome check . --skip=a11y --skip=style/noNonNullAssertion --skip=suspicious/noExplicitAny --skip=complexity/noBannedTypes --skip-parse-errors --no-errors-on-unmatched 2>&1
typecheck:
name: Typecheck all packages + apps
runs-on: ubuntu-latest
timeout-minutes: 5
needs: [static-check]
steps:
- uses: actions/checkout@v7
- uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ env.BUN_VERSION }}
no-cache: false
- run: bun install --frozen-lockfile
- name: Build workspace packages
run: bash scripts/build-all.sh
- name: Typecheck packages
run: |
for pkg in protocol models events sdk storage core permissions tools shell diff tokens cache planner config ui auth collab eval plugin-sdk telemetry; do
echo " [typecheck] packages/$pkg"
(cd packages/$pkg && bun run typecheck) || exit 1
done
- name: Typecheck plugins
run: |
for plugin in agent-workbench-hermes; do
echo " [typecheck] plugins/$plugin"
(cd plugins/$plugin && bun run typecheck) || exit 1
done
- name: Typecheck apps
run: |
for app in server tui cli mobile-web dashboard; do
echo " [typecheck] apps/$app"
(cd apps/$app && bun run typecheck) || exit 1
done
test:
name: Unit + integration tests
runs-on: ${{ matrix.os }}
timeout-minutes: 10
needs: [typecheck]
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v7
- uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ env.BUN_VERSION }}
no-cache: false
- run: bun install --frozen-lockfile
- name: Build workspace packages
run: bash scripts/build-all.sh
- name: Run tests with coverage
run: bun test --coverage
- name: Upload coverage reports
uses: actions/upload-artifact@v4
with:
name: coverage-reports
path: coverage/
- name: Upload to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage/lcov.info
fail_ci_if_error: false
e2e:
name: End-to-end tests
runs-on: ubuntu-latest
timeout-minutes: 10
needs: [typecheck]
steps:
- uses: actions/checkout@v7
- uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ env.BUN_VERSION }}
no-cache: false
- run: bun install --frozen-lockfile
- name: Build workspace packages
run: bash scripts/build-all.sh
- name: Run e2e tests
run: bun run test:e2e