ci: one web job per app (ticket, admin, partner) #153

Merged
amiryahaya merged 3 commits from feat/ci-web-per-app into main 2026-11-03 16:25:52 +01:00
Owner

Splits the single CI web job 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.sh now prints web_ticket, web_admin and web_partner instead of web.
  • A change under web/apps/<app>/ runs only that app's job.
  • Any other web path runs all three jobs: packages, package.json, the lockfile, workspace config, or a folder under web/apps/ that isn't one of the three apps. So do the spec, scripts/{generate-clients,web-e2e}.sh and the workflows.
  • A moved file counts at both its old and new path (--no-renames), so moving a file out of a shared package still runs every app.
  • ci-gate.needs lists all three jobs, and skipped jobs still pass. Branch protection still requires only ci-gate.

What each job does

  • pnpm generate, then pnpm --filter "@kws/<app>..." typecheck and test. 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.sh now 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-partner has no e2e step yet: on main the 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:

  1. Add partner's e2e and artifact steps to web-partner. Copy them from web-admin, with ./scripts/web-e2e.sh partner and the artifact playwright-report-partner.
  2. Drop #152's partner lines in web-e2e.sh and the artifact paths on the old web job. 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.sh locally: with no arguments, ticket 207 and admin 140 tests passed; admin alone, 140 passed.
  • Filtered typecheck and test pass for all three apps; pnpm --filter @kws/partner build passes.
  • Coverage (make cover): 91.6% total, minimum 80%. No Go code changed.
  • Review: Pass 1 (ponytail) found nothing to fix. Pass 2 found five issues, all fixed in the second commit: the partner build ran nowhere, renamed files could skip an app, an unknown app folder ran nothing, and two CLAUDE.md lines were out of date.
  • CLAUDE.md (CI section) and web/README.md are updated.

🤖 Generated with Claude Code

Splits the single CI `web` job 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.sh` now prints `web_ticket`, `web_admin` and `web_partner` instead of `web`. - A change under `web/apps/<app>/` runs only that app's job. - Any other web path runs all three jobs: packages, `package.json`, the lockfile, workspace config, or a folder under `web/apps/` that isn't one of the three apps. So do the spec, `scripts/{generate-clients,web-e2e}.sh` and the workflows. - A moved file counts at both its old and new path (`--no-renames`), so moving a file out of a shared package still runs every app. - `ci-gate.needs` lists all three jobs, and skipped jobs still pass. Branch protection still requires only `ci-gate`. ## What each job does - `pnpm generate`, then `pnpm --filter "@kws/<app>..." typecheck` and `test`. 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.sh` now 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-partner` has no e2e step yet: on `main` the 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: 1. Add partner's e2e and artifact steps to `web-partner`. Copy them from `web-admin`, with `./scripts/web-e2e.sh partner` and the artifact `playwright-report-partner`. 2. Drop #152's partner lines in `web-e2e.sh` and the artifact paths on the old `web` job. 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.sh` locally: with no arguments, ticket 207 and admin 140 tests passed; `admin` alone, 140 passed. - Filtered typecheck and test pass for all three apps; `pnpm --filter @kws/partner build` passes. - Coverage (`make cover`): **91.6%** total, minimum 80%. No Go code changed. - Review: Pass 1 (ponytail) found nothing to fix. Pass 2 found five issues, all fixed in the second commit: the partner build ran nowhere, renamed files could skip an app, an unknown app folder ran nothing, and two CLAUDE.md lines were out of date. - CLAUDE.md (CI section) and `web/README.md` are updated. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
detect-changes.sh prints web_ticket, web_admin and web_partner instead of
web. A change under web/apps/<app>/ runs that app's job; anything else
under web/, the spec, the web scripts and the workflows run every app.
Each job type-checks and tests "@kws/<app>..." (the app and the packages
it uses) and runs scripts/web-e2e.sh <app>, which now takes the apps to
run (default: every app that pins @playwright/test). The partner job has
no e2e step until the app has a suite (#152). ci-gate needs all three.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ci: moved files and new apps run every web job; build partner
All checks were successful
ci / changes (pull_request) Successful in 17s
ci / web-partner (pull_request) Successful in 1m28s
ci / clients (pull_request) Successful in 1m34s
ci / web-ticket (pull_request) Successful in 3m56s
ci / api (pull_request) Successful in 15m14s
ci / web-admin (pull_request) Successful in 3m59s
ci / ci-gate (pull_request) Successful in 3s
8d804ef2d6
detect-changes.sh lists both paths of a rename (--no-renames), so moving
a file out of a shared package still runs every app, and treats a path
under web/apps/ outside the known apps as shared, so a new app is not
silently skipped. The partner job runs the production build that the
old all-apps e2e build used to cover. Doc fixes in CLAUDE.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merge remote-tracking branch 'origin/main' into feat/ci-web-per-app
All checks were successful
ci / changes (pull_request) Successful in 19s
ci / clients (pull_request) Successful in 1m59s
ci / web-partner (pull_request) Successful in 3m47s
ci / web-admin (pull_request) Successful in 5m53s
ci / web-ticket (pull_request) Successful in 6m49s
ci / api (pull_request) Successful in 12m25s
ci / ci-gate (pull_request) Successful in 4s
35c535b06a
# Conflicts:
#	CLAUDE.md
#	scripts/web-e2e.sh
Author
Owner

Merged main after #152 landed. As planned, web-partner now runs ./scripts/web-e2e.sh partner with 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%.

Merged main after #152 landed. As planned, web-partner now runs `./scripts/web-e2e.sh partner` with 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%.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
primatekuntech/kws!153
No description provided.