`form import` reads hanzoai/commerce's forms, subscribers and submissions through commerce's own datastore and models, and writes them through /v1/form: each form a PUT on commerce-<id>, its records 500 a batch to import, a cursor after every acknowledged batch. -dry only counts. It is a module of its own (cmd/form): cloud serves no commerce form route, so the store is the only read path, and commerce's tree stays out of the service. Claude-Session: https://claude.ai/code/session_016DKtyuzxU43Gsc6Pm9vKTF
38 lines
1.2 KiB
YAML
38 lines
1.2 KiB
YAML
# CI/CD for hanzoai/form, read by the hanzoai/ci reusable (.github/workflows/cicd.yml)
|
|
# and by platform.hanzo.ai. A Go module embedded by hanzo-inc/cloud: it ships from a
|
|
# tag and builds no image. packages/form is @hanzo/form, the renderer and embed,
|
|
# its own pnpm root.
|
|
|
|
test:
|
|
- name: build
|
|
run: go build ./...
|
|
- name: vet
|
|
run: go vet ./...
|
|
- name: test
|
|
run: go test -count=1 ./...
|
|
# cmd/form is its own module (it reads commerce's store through commerce's
|
|
# packages), so the root ./... does not reach it.
|
|
- name: importer
|
|
run: cd cmd/form && CGO_ENABLED=0 go vet ./... && CGO_ENABLED=0 go test -count=1 ./...
|
|
- name: package
|
|
run: |
|
|
set -e
|
|
corepack enable
|
|
cd packages/form
|
|
pnpm install --frozen-lockfile
|
|
pnpm typecheck
|
|
pnpm build
|
|
pnpm test
|
|
# The renderer in chromium. The runner cannot sudo and its image carries
|
|
# chromium's libraries; its baked browsers sit under /opt as root, so the
|
|
# job's own copy goes where the job may write.
|
|
- name: renderer
|
|
run: |
|
|
set -e
|
|
corepack enable
|
|
cd packages/form
|
|
pnpm install --frozen-lockfile
|
|
export PLAYWRIGHT_BROWSERS_PATH="$PWD/.cache/ms-playwright"
|
|
pnpm exec playwright install chromium
|
|
pnpm e2e
|