perf: cut CI installs by parallelizing jobs and trimming browser downloads #19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "perf/ci-faster-installs"
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?
Reduces CI wall-clock time by removing repeated/unnecessary dependency installation. Constraint: the Forgejo runner has no cache server, so these changes reduce work rather than relying on actions/cache.
Removed the setup-environment job entirely. All three jobs declared 'needs: setup-environment', so nothing started until an apt install of mkcert + artifact upload finished — for certs that only the e2e job actually uses. The frontend job builds vite in production mode (no https, no pem read) and backend only runs ruff + django test (never manage.py serve). Certs are now generated inline in the e2e job with openssl (preinstalled, no apt) instead of mkcert; self-signed is sufficient because Playwright sets ignoreHTTPSErrors and vite/django only read the keypair off disk. frontend, backend and e2e now start immediately in parallel.
e2e no longer downloads webkit. 'playwright install --with-deps' had no browser argument, pulling chromium + headless-shell + firefox + webkit + ffmpeg, while playwright.config.ts declares only chromium and firefox. Now installs 'chromium firefox', which also avoids webkit's heavy apt dependency set.
frontend job no longer needs a browser at all. Added a 'build:ci' script (tsc -b && vite build) that skips the prerender step, so the job drops its Playwright chromium install (and, on GitHub, its cache block). The prerender path stays covered because Playwright's webServer runs the full 'npm run build' before the e2e suite.
Smaller fixes: e2e gains --frozen-lockfile (matching the frontend job), setup-uv gains enable-cache, and its postgres service gains the --tmpfs the backend job already had. Dropped @vitejs/plugin-basic-ssl, which was declared but referenced nowhere in the repo.
Verified locally: build:ci emits a 1.7KB shell with no browser launch while build still prerenders to 11.7KB; full e2e suite passes 8/8 against openssl-generated self-signed certs in CI mode; unit tests 68/68; both workflow files parsed and asserted to have no stale 'needs', no ssl-certs artifact, and the correct browser list.