ci: one web job per app (ticket, admin, partner) #153
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
primatekuntech/kws!153
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/ci-web-per-app"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Splits the single CI
webjob into one job per app, so each app's job runs only when that app, or something all the apps share, changes.What runs when
scripts/detect-changes.shnow printsweb_ticket,web_adminandweb_partnerinstead ofweb.web/apps/<app>/runs only that app's job.package.json, the lockfile, workspace config, or a folder underweb/apps/that isn't one of the three apps. So do the spec,scripts/{generate-clients,web-e2e}.shand the workflows.--no-renames), so moving a file out of a shared package still runs every app.ci-gate.needslists all three jobs, and skipped jobs still pass. Branch protection still requires onlyci-gate.What each job does
pnpm generate, thenpnpm --filter "@kws/<app>..." typecheckandtest. The...takes in the shared packages the app uses, so every package is still checked in at least one job.scripts/web-e2e.sh <app>, plus its own artifact,playwright-report-<app>.web-e2e.shnow takes app names. With none, it runs every app that pins@playwright/test. It still checks that every pin is the same version, and it builds only the apps it runs.web-partnerhas no e2e step yet: onmainthe partner app is a placeholder with no suite. It runs its production build, which the old all-apps job used to cover.Merging with #152
#152 conflicts with this PR. Whichever of the two merges second must:
web-partner. Copy them fromweb-admin, with./scripts/web-e2e.sh partnerand the artifactplaywright-report-partner.web-e2e.shand the artifact paths on the oldwebjob. The script picks partner up by itself once partner pins Playwright.Checks
scripts/detect-changes_test.sh: 29 pass. New cases cover each app alone, shared packages, root workspace files, a new app folder and a file moved out of a package. The move case fails without--no-renames.scripts/web-e2e.shlocally: with no arguments, ticket 207 and admin 140 tests passed;adminalone, 140 passed.pnpm --filter @kws/partner buildpasses.make cover): 91.6% total, minimum 80%. No Go code changed.web/README.mdare updated.🤖 Generated with Claude Code
Merged main after #152 landed. As planned, web-partner now runs
./scripts/web-e2e.sh partnerwith its own artifact (playwright-report-partner), replacing the stop-gap build step. #152's artifact paths, which the merge had put in web-admin, are moved to web-partner. web-e2e.sh keeps the generic version, which picks partner up by its Playwright pin. Local results: all apps (ticket 207, admin 140, partner 25), partner alone (25), detect-changes tests (29), coverage 91.5%.