-
Notifications
You must be signed in to change notification settings - Fork 13
128 lines (106 loc) · 3.4 KB
/
Copy pathci.yml
File metadata and controls
128 lines (106 loc) · 3.4 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
name: CI
on:
pull_request:
branches: ["main"]
push:
branches: ["main"]
workflow_call:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
go-test:
name: Go Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Run Go tests
run: go test ./... -count=1
web-build:
name: Web Build
runs-on: ubuntu-latest
defaults:
run:
working-directory: web/admin
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Enable corepack
run: corepack enable
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
package_json_file: web/admin/package.json
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm
cache-dependency-path: web/admin/pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build web app
run: pnpm build
perf-benchmark:
name: Performance Benchmark (synthetic 10k, local baseline)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install hyperfine + ripgrep + jq
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends hyperfine ripgrep jq
- name: Generate synthetic tree
run: bash scripts/gen-bench-tree.sh --count=10000 --output=/tmp/bench-tree --seed=42
- name: Run benchmark (CI baseline only)
run: bash scripts/perf-benchmark.sh --ci-mode --runs=10 --warmup=1
- name: Upload bench artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: perf-bench-${{ github.sha }}
path: .planning/phases/35-e2e/benchmarks/
if-no-files-found: warn
retention-days: 30
image-size-regression:
name: Image Size Regression (BASE-04 ≤ 2GB)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Read expected image name
id: read-image
run: |
IMAGE_NAME=$(awk -F': ' '$1 == "local_dev_image_name" { print $2 }' deploy/docker/managed-user/image.lock)
if [ -z "$IMAGE_NAME" ]; then
echo "failed to read local_dev_image_name from image.lock" >&2
exit 1
fi
echo "IMAGE_NAME=$IMAGE_NAME" >> "$GITHUB_OUTPUT"
- name: Build managed-user image
run: |
docker build \
-t "${{ steps.read-image.outputs.IMAGE_NAME }}" \
-f deploy/docker/managed-user/Dockerfile \
.
- name: Run verify-managed-image.sh
run: bash scripts/verify-managed-image.sh
- name: Assert uncompressed size ≤ 3GB
run: |
size=$(docker image inspect "${{ steps.read-image.outputs.IMAGE_NAME }}" --format='{{.Size}}')
max=$((2048 * 1024 * 1024)) # 2048 MiB = 2147483648 bytes
echo "image_size_bytes=$size (max=$max)"
if [ "$size" -gt "$max" ]; then
echo "FAIL: image size $size > $max (2GB)" >&2
exit 1
fi
echo "PASS: image size within BASE-04 budget"