From 500257107ba3b46da7024337ce62c5ae82095509 Mon Sep 17 00:00:00 2001 From: swithek <52840391+swithek@users.noreply.github.com> Date: Sun, 4 Oct 2026 17:23:21 +0200 Subject: [PATCH] add check-all make command --- AGENTS.md | 2 ++ Makefile | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 48ec3119..09b84217 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -112,6 +112,8 @@ make run / start / stop # dev stack foreground / background / stop make dev # backend containers + web dev server on :3000 make check-env / sync-env # report / reconcile *.local.env against templates make lint / check-lint # fix / verify lint, format and types everywhere +make test # unit tests + coverage gates everywhere +make check-all # lint, test, e2e-dev, e2e-prod; run before a commit make prod-build / prod-run[-no-email] / prod-stop # all-in-one image on :8080 (mailpit :8025) make e2e-{dev,prod}[-stack-build|-stack-stop] # dev stack :18080, prod image :19080 (no email :19081) ``` diff --git a/Makefile b/Makefile index 2104c29e..54e2c55c 100644 --- a/Makefile +++ b/Makefile @@ -118,6 +118,25 @@ check-lint: @$(QUIET) "checking e2e" sh -c 'cd e2e && pnpm run check-lint' @$(QUIET) "checking launcher" sh -c 'cd docker/prod/launcher && pnpm run check-lint' +# unit tests of every component, with the coverage gates CI applies. +.PHONY: test +test: + @$(QUIET) "testing web" sh -c 'cd web && pnpm run test' + @$(QUIET) "testing auth-realtime" sh -c 'cd server/auth-realtime && pnpm run test' + @$(QUIET) "testing core" sh -c 'cd server/core && make check-coverage' + @$(QUIET) "testing datagen" sh -c 'cd datagen && make check-coverage' + @$(QUIET) "testing launcher" sh -c 'cd docker/prod/launcher && pnpm run test' + +# everything CI checks, to run before a commit. The steps must run one +# after another, because lint rewrites the files the tests read. Listing +# them as `check-all: lint test ...` would let `make -j` run them at once. +.PHONY: check-all +check-all: + @$(MAKE) lint + @$(MAKE) test + @$(MAKE) e2e-dev + @$(MAKE) e2e-prod + .PHONY: setup setup: cd web && pnpm run setup