Repository navigation
238 lines (225 loc) Β· 10.4 KB
/
Copy pathtest.yml
File metadata and controls
238 lines (225 loc) Β· 10.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
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
# pr.yml μμλ§ νΈμΆλλ€(λ¨λ
νΈλ¦¬κ±° μμ). νΈλ¦¬κ±°μ λ¨μΌ νμ 체ν¬(`pr-gate`)λ pr.yml μ μλ€.
#
# μ΄λ―Έμ§κ° νμ μλ κ²μ¬ μ λΆ β λ¬Έμβμ½λ κ²μ΄νΈ, lintΒ·unit, in-process ν΅ν© νλ€μ€,
# envtest, μ¬μ νλ‘ν νμ
. μ΄λ―Έμ§λ₯Ό μ°λ kind e2e λ e2e.yml μ΄λ€(κ·Έ κ²½λ‘λ₯Ό μΆ©μ€λ μ€ν¬λ¦½νΈμ
# μ ν©μ± λͺ¨λΈμ΄ μ€μΊνλ―λ‘ μ΄ νμΌμ ν©μΉμ§ μλλ€). μ΄ νμΌμ `image` λ₯Ό κΈ°λ€λ¦¬μ§ μκ³
# PR μ΄ μ΄λ¦¬μλ§μ λλ€.
#
# `sha` λ PR head SHA λ€ β κΈ°λ³Έ 체ν¬μμ(refs/pull/N/merge)μ΄ μλλΌ μ΄λ―Έμ§ νκ·Έμ κ°μ
# 컀λ°μ κ²μ¬νλ€.
name: Test
on:
workflow_call:
inputs:
sha:
description: κ²μ¬ν 컀λ°(PR head SHA)
required: true
type: string
journey:
description: μ¬μ λ¬ΈμΒ·mockupΒ·νλ€μ€κ° λ°λμλκ°(pr.yml μ changes νμ )
required: true
type: boolean
playwright:
description: journey μ‘μ Playwright 컨ν
μ΄λ νκ·Έ(tools/package-lock.json μμ μ½μ λ²μ )
required: true
type: string
permissions:
contents: read
jobs:
static-gates:
name: static gates (docs <-> code)
runs-on: ubuntu-24.04-arm
timeout-minutes: 10
# ν΄μ²΄μΈ μμ΄ python3 νμ€ λΌμ΄λΈλ¬λ¦¬ / sh λ§μΌλ‘ λλ λ¬Έμβμ½λ κ²μ΄νΈ λ·μ ν μ‘μ
# λͺ¨μλ€. κ°κ° μ μ΄μ§λ¦¬λΌ μ‘ λ·μ λμ°λ λ¬λ κΈ°λ λΉμ©μ΄ λ³Έ μμ
λ³΄λ€ μ»Έλ€. ν κ²μ΄νΈκ°
# μ€ν¨ν΄λ λλ¨Έμ§κ° λͺ¨λ νμ μ λ΄λλ‘ λ€ μ€ν
μ `!cancelled()` λ‘ λλ€.
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.sha }}
# docs/test/e2e.md μ μΆ©μ€λ νμ©λͺ©λ‘ β e2e SUT κ²½λ‘μ seam: λͺ¨λ seam μ΄ λ±μ¬(λλ
# λΉ-seam / λ―Έν΄μ μλ°μΌλ‘ νκ³)λκ³ , λͺ¨λ λ±μ¬κ° μ½λμ μμΌλ©°, λ―Έν΄μ μλ° μκ°
# μ μΈλ μν μ΄νμ¬μΌ νλ€ β μΉμΈλμ§ μμ web λ€νΈμν¬ μΈν°μ
νΈλ μ€μ΄λ€ μλ§ μλ€.
- name: e2e fidelity allowlist (docs <-> code seams)
run: python3 scripts/check-fidelity-allowlist.py
# mockup β ꡬν seam: ꡬνλ νλ©΄Β·μ
Έ μ»΄ν¬λνΈλ§λ€ mockup μ μΈ(docs/mockups/README.md
# μλ°©ν₯ λ±μ¬), λμμΈ μμ€ν
μ λ³Έ μ΄νμ web/src/design/README.md μμ₯μ μ²λΆκ³Ό ν¨κ»,
# ν¨λ λ¨μ ꡬ쑰 diff λ κ²μ¬κΈ° μ¬κ³μ°κ³Ό μΌμΉ β μνμ μ€μ΄λ€ μλ§ μλ€. μ κ²μ΄νΈκ°
# e2e μΆ©μ€λ(ν
μ€νΈκ° 무μμ μΉννλ)λΌλ©΄ μ΄μͺ½μ λ λ μΆ©μ€λ(νλ©΄μ΄ mockup κ³Ό λ§λ).
- name: render fidelity (mockups <-> SPA screens)
if: ${{ !cancelled() }}
run: python3 scripts/check-render-fidelity.py
# docs/comment-policy/ledger.md μ νμ μμ₯ β μ€μ μ£Όμ: λ±μ¬ λ²μκ° μ€μΊ λ²μμ
# μκ³ , μ€ μΒ·μ§λ¬Έμ΄ λ리ννΈ λͺ¨λΈκ³Ό κ°μ μΆμΆλ‘ μ¬μΈ‘μ ν΄λ μΌμΉνλ©°, μ€λ³΅ λ±μ¬κ° μκ³
# ν©κ³κ° νκ³Ό λ§μμΌ νλ€. μ΄κ² μμΌλ©΄ μ΄λ―Έ νμ λ λ²μμ μ£Όμμ λν PR μ μ¦λΆμ΄
# μμν νμ λμ§ μμ μ± λ¨λλ€.
- name: comment policy ledger (docs <-> comments)
if: ${{ !cancelled() }}
run: python3 scripts/check_comment_policy.py
# ν
μ€νΈ μλλ¦¬μ€ β e2e νμΌ 1:1: μλ리μ€λ§λ€ μ μΈ νμΌμ΄ μ νν νλ(λλ λ±μ¬λ
# μμΈ/μ μ ν), λ§€μΉ λ¨μ νμΌλ§λ€ μ€μ¬ μλλ¦¬μ€ νλ, docs/test/e2e.md μ λ±μ¬Β·μ§κ³κ°
# μ€μ μ μΌμΉ. ν΄λ¬μ€ν° μμ΄ μ μ΄.
- name: μλλ¦¬μ€ β e2e 1:1 mapping
if: ${{ !cancelled() }}
run: ./scripts/e2e/check-scenario-mapping.sh
control-plane:
name: control-plane (lint + unit)
runs-on: ubuntu-24.04-arm
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.sha }}
# λͺ¨λμ΄ λ ν¬ λ£¨νΈκ° μλλΌ νμ λλ ν°λ¦¬μ μμ΄μ, cache-dependency-path λ₯Ό μ£Όμ§ μμΌλ©΄
# setup-go κ° go.sum μ λͺ» μ°Ύμ λͺ¨λΒ·λΉλ μΊμλ₯Ό ν΅μ§Έλ‘ 건λλ΄λ€(vet μ΄ λ§€λ² ~60s).
- uses: actions/setup-go@v5
with:
go-version: "1.24"
cache-dependency-path: control-plane/go.sum
- name: go vet
working-directory: control-plane
run: go vet ./...
# The e2e suite is behind the `e2e` build tag, so the vet above never
# compiles it and only the (cluster-bound) e2e job would catch a
# broken test file. Vet it here so every PR type-checks it.
- name: go vet (e2e build tag)
working-directory: control-plane
run: go vet -tags=e2e ./...
- name: gofmt check
working-directory: control-plane
run: test -z "$(gofmt -l .)"
- name: unit tests
working-directory: control-plane
run: go test ./...
data-plane:
name: data-plane (lint + unit)
runs-on: ubuntu-24.04-arm
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.sha }}
- uses: actions/setup-go@v5
with:
go-version: "1.24"
cache-dependency-path: data-plane/go.sum
- name: go vet
working-directory: data-plane
run: go vet ./...
- name: gofmt check
working-directory: data-plane
run: test -z "$(gofmt -l .)"
- name: unit tests
working-directory: data-plane
run: go test ./...
- uses: actions/setup-node@v4
with:
node-version: "22"
- name: codex runner tests
working-directory: data-plane/codex-runner
run: npm ci && node --test
- name: claude runner tests
working-directory: data-plane/claude-runner
run: npm ci --omit=optional && node --test
web:
name: web (typecheck + build)
runs-on: ubuntu-24.04-arm
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.sha }}
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
cache-dependency-path: web/package-lock.json
- name: install
working-directory: web
run: npm ci
- name: typecheck
working-directory: web
run: npm run lint
- name: build
working-directory: web
run: npm run build
integration:
name: integration (happy path)
runs-on: ubuntu-24.04-arm
timeout-minutes: 15
# In-process happy-path harness (build tag `integration`): mounts the API
# handlers over the in-memory stub adapters, so there is no external infra
# and it runs on every PR alongside the unit tests. The deployed kind-SUT
# version of these scenarios lives in e2e.yml. The shell archive round trip
# (Scenario 4) skips unless SHELL_ARCHIVE_ENABLED=1 with a reachable cluster.
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.sha }}
- uses: actions/setup-go@v5
with:
go-version: "1.24"
cache-dependency-path: control-plane/go.sum
- name: integration harness
working-directory: control-plane
run: go test -tags=integration ./...
envtest:
name: envtest (real-apiserver CAS/Lease)
runs-on: ubuntu-24.04-arm
timeout-minutes: 15
# Real kube-apiserver + etcd conflict suite (AC-C1 single-winner) in the
# isolated nested module. controller-runtime/envtest lives only there, so
# the main module gains no runtime dependency. `make test-envtest`
# provisions the apiserver/etcd binaries via setup-envtest.
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.sha }}
- uses: actions/setup-go@v5
with:
go-version: "1.24"
cache-dependency-path: control-plane/internal/adapter/configmap/envtest/go.sum
# setup-envtest κ° λ°λ kube-apiserver/etcd λ°μ΄λ리λ ENVTEST_K8S_VERSION μΌλ‘ κ³ μ λλ―λ‘
# κ·Έ κ°μ ν€λ‘ μΊμνλ€. ννΈνλ©΄ `setup-envtest use` κ° λ€μ΄λ‘λ μμ΄ κ²½λ‘λ§ λλ €μ€λ€.
- id: envtest-version
run: |
v=$(sed -nE 's/^ENVTEST_K8S_VERSION[[:space:]]*\?=[[:space:]]*([^[:space:]]+).*/\1/p' Makefile)
[ -n "$v" ] || { echo "::error::Makefile μμ ENVTEST_K8S_VERSION μ λͺ» μ½μ"; exit 1; }
echo "k8s=$v" >> "$GITHUB_OUTPUT"
- uses: actions/cache@v4
with:
path: ~/.local/share/kubebuilder-envtest
key: envtest-bins-${{ runner.os }}-${{ runner.arch }}-${{ steps.envtest-version.outputs.k8s }}
- name: real-apiserver conflict tests
run: make test-envtest
journey-prototype:
name: μ¬μ β μ¬μ mockup 1:1 (νλ‘ν νμ
μΆ©μ€λ ν¬ν¨)
if: inputs.journey
runs-on: ubuntu-24.04-arm
timeout-minutes: 15
# μ¬μ©μ μ¬μ λ¬Έμ β μ¬μ mockup(docs/journeys/) μ 1:1 μ ν©μ± κ²μ΄νΈ.
#
# μ¬μ βνμ΄μ§Β·λ¨κ³ μ§ν©Β·λΆκΈ° λ°°μ κ°μ ꡬ쑰λ νμΌμ μ½μ΄ μ
μ μμ§λ§,
# "λ²νΌμ΄ μ€μ λ‘ λ€μ λ¨κ³λ‘ λ°λ €κ°λκ°" Β· "μ
λ ₯μ΄ μ§μ§ μ
λ ₯μΈκ°" Β·
# "μ μ κ²½λ‘ λ° μνμ λλ¬νλκ°" λ DOM μ κ΅΄λ €μΌλ§ μ μ μλ€. κ·Έλμ μ΄ μ‘μ
# Playwright chromium μΌλ‘ κ° νμ΄μ§λ₯Ό file:// λ‘ μ΄μ΄ μ€μ λ‘ ν΄λ¦νλ€.
# νμ κΈ°μ€λ§ μκ³ μ§νμ΄ μμΌλ©΄ κ·Έ κΈ°μ€μ μ‘°μ©ν μ©λλ€.
#
# 곡μ Playwright μ΄λ―Έμ§ μμμ λλ€. λ¬λμμ `playwright install --with-deps` λ₯Ό νλ©΄
# apt λ―Έλ¬κ° 25MB λ₯Ό 42kB/s λ‘ λ΄λ € 10λΆμ© 걸리λ μΌμ΄ μ¦μλ€(λΈλΌμ°μ Β·μμ€ν
μμ‘΄μ±μ΄
# μ΄λ―Έμ§μ λ€μ΄ μλ€). νκ·Έλ pr.yml `changes` μ‘μ΄ tools/package-lock.json μμ μ½μ λ²μ μ΄λ€.
container:
image: mcr.microsoft.com/playwright:v${{ inputs.playwright }}-noble
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.sha }}
# tools/ λ μ ν μ½λκ° μλλΌ λ¬Έμ κ²μ΄νΈ μ μ© νλ€μ€λΌ web/ κ³Ό μμ‘΄μ±μ λλλ€.
# λ½νμΌμ 컀λ°ν΄ λμμΌλ―λ‘ ci λ‘ κ³ μ μ€μΉνλ€.
- name: install harness deps
working-directory: tools
run: npm ci
# node:test λ¬λ. μ€ν¨ μ μ΄λ κ·μΉμ μ΄λ λ¨κ³μΈμ§ λ©μμ§μ λμ¨λ€.
- name: journey prototype fidelity
working-directory: tools
run: node --test journey-prototype.test.mjs