ci: build the prod stack and e2e-test it with Playwright#5
Open
gthanasis wants to merge 3 commits into
Open
Conversation
- New `e2e` CI job — builds docker-compose.prod.yml, brings the stack up, waits for /health, runs Playwright against the dashboard, tears down. - Playwright setup: root config + e2e/home.spec.ts asserting the home page loads (dashboard title, no runtime error) and the API /health endpoint responds. - docker-compose.prod.yml: distinct project name `trader-prod` so it never collides with the dev docker-compose.yml on a shared machine. - DEPLOY.md: note that POSTGRES_PASSWORD is fixed at DB volume init. - .dockerignore: exclude env files at any depth (a nested .env.local symlink broke `next build`) and ignore e2e / playwright artefacts. Validated locally: image builds, the prod stack runs (migrate, API, web, liquidation websocket), and Playwright passes 3/3 against it. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
vitest has no `include` glob, so its default `**/*.spec.ts` matched the
new Playwright spec `e2e/home.spec.ts` and failed the unit-test run
("Playwright Test did not expect test() to be called here"). Exclude
`**/e2e/**` — those specs run via `pnpm test:e2e`.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The app title is "Moon Trader" after the open-source rebrand; the spec still expected "Trader Dashboard". Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a CI job that builds the production Docker stack and runs an
end-to-end test against it with Playwright.
e2eCI job — buildsdocker-compose.prod.yml, brings thestack up, waits for
/health, runs Playwright against the dashboard,tears down (with stack logs on failure).
playwright.config.ts+e2e/home.spec.ts:the home page loads (dashboard title, no runtime error) and the API
/healthendpoint responds.test:e2escript added.docker-compose.prod.yml— distinct project nametrader-prodso it never collides with the dev
docker-compose.yml(which alsodefines a
postgresservice) on a shared machine.DEPLOY.md— note thatPOSTGRES_PASSWORDis fixed at DB volumeinitialisation.
.dockerignore— exclude env files at any depth (a nested.env.localsymlink brokenext build) and ignore Playwright output.Validation
Run locally before pushing:
liquidation websocket all come up.
🤖 Generated with Claude Code