Add Vite build step to CI pipeline #27

Open
opened 2026-03-30 01:09:59 +02:00 by myrmidex · 0 comments
Owner

The CI workflow (ci.yml) only runs PHP checks (Pint, PHPStan, PHPUnit) but does not build frontend assets. This means broken JS/TS imports (like the dashboard route that broke the v0.2.0 image build) are not caught until the Docker image build step.

Problem:

  • npm run build is only run during docker build (Dockerfile line 51)
  • CI runs on push to release/* and PR to main — neither catches frontend build failures
  • Result: PHP tests pass green, PR merges, then the image build fails

Fix:
Add a Node.js setup + npm ci + npm run build step to ci.yml, running before PHP tests. This catches:

  • Broken imports (missing exports, typos)
  • TypeScript type errors
  • Vite/Rollup build failures

Scope:

  • Add Node.js 22 setup to CI
  • Cache node_modules via package-lock.json hash
  • Run npm run build as a CI step
  • Optionally run ESLint (npm run lint) as a separate step

This ensures both pushes to release/* and PRs to main validate the full build.

The CI workflow (`ci.yml`) only runs PHP checks (Pint, PHPStan, PHPUnit) but does **not** build frontend assets. This means broken JS/TS imports (like the `dashboard` route that broke the v0.2.0 image build) are not caught until the Docker image build step. **Problem:** - `npm run build` is only run during `docker build` (Dockerfile line 51) - CI runs on push to `release/*` and PR to `main` — neither catches frontend build failures - Result: PHP tests pass green, PR merges, then the image build fails **Fix:** Add a Node.js setup + `npm ci` + `npm run build` step to `ci.yml`, running **before** PHP tests. This catches: - Broken imports (missing exports, typos) - TypeScript type errors - Vite/Rollup build failures **Scope:** - Add Node.js 22 setup to CI - Cache `node_modules` via `package-lock.json` hash - Run `npm run build` as a CI step - Optionally run ESLint (`npm run lint`) as a separate step This ensures both pushes to `release/*` and PRs to `main` validate the full build.
myrmidex added this to the v0.3.0 milestone 2026-03-30 01:09:59 +02:00
myrmidex added the
bug
label 2026-03-30 01:09:59 +02:00
Sign in to join this conversation.
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: lvl0/buckets#27
No description provided.