Conversation
…ush workflows Add three GitHub Actions workflows: - test-coverage.yml: runs on every push/PR to main. Builds the dev container, generates Prisma client, and runs unit + integration tests with 100% coverage thresholds enforced by vitest config. - docker-build-test.yml: manual workflow (workflow_dispatch) that builds the production Docker image and runs a smoke test without publishing. - build-and-push.yml: automatic workflow triggered after test-coverage passes on main. Builds multi-arch (linux/amd64, linux/arm64) image and pushes to ghcr.io with latest, version, and sha-<commit> tags. Removes the old build-push.yml which had no CI dependency.
…single container session Each creates an ephemeral container. Running prisma generate in one container and tests in another meant the generated Prisma client was invisible to subsequent test steps, causing '@prisma/client did not initialize yet' errors. Consolidate into a single with chained commands: yarn prisma generate && yarn test:all This ensures the Prisma client is generated and immediately available for both unit and integration test suites.
… tests Integration tests hit a real SQLite database (test.db via test-db.ts), but the schema tables (Session, Account, Transaction, etc.) were never created because prisma migrate deploy was not being run in CI. Add DATABASE_URL=file:./test.db yarn prisma migrate deploy before yarn test:all so the integration test database has the full schema. Unit tests are unaffected — they mock @/lib/db and don't touch a real DB.
…o main workflow_dispatch only works from the default branch, making the manual Docker build test invisible until merged. Add pull_request and push triggers so the Docker build is validated BEFORE merging, not after. Now when you open a PR: - test-coverage.yml → runs unit + integration tests (100% coverage) - docker-build-test.yml → builds + smoke tests the production image - Both must pass before merging
Next.js App Router route files (app/api/**/route.ts) may only export HTTP method handlers (GET, POST, etc.). The previously exported and caused a build error: 'resetBootstrapCache' is not a valid Route export field. Move bootstrap token caching (getBootstrapHash, resetBootstrapCache) to src/lib/mcp-bootstrap.ts and import it in route.ts. Add a unit test (mcp-bootstrap.test.ts) covering all cache paths to maintain 100% coverage across src/lib/.
Two issues caused the production container to be unhealthy: 1. Missing Prisma CLI binary — the Dockerfile runner stage copied node_modules/prisma and @prisma but not node_modules/.bin/prisma, so npx could not find the prisma command, causing the entrypoint to fail on 'prisma generate' and 'prisma migrate deploy'. 2. EACCES on Prisma generated client — after fixing the binary, the 'prisma generate' safety net in the entrypoint tried to overwrite root-owned generated client files, but the container runs as UID 1001 (nextjs). Added chown for all Prisma-related node_modules directories before USER nextjs. Also fixed PRAGMA log noise in db.ts: use instead of since SQLite PRAGMA statements return results, which logs as errors.
Fixes the Node.js 20 deprecation warning by upgrading all actions to versions that use the Node.js 24 runtime: actions/checkout v4 -> v5 (node20 -> node24) docker/setup-buildx-action v3 -> v4 (node20 -> node24) docker/setup-qemu-action v3 -> v4 (node20 -> node24) docker/login-action v3 -> v4 (node20 -> node24) docker/build-push-action v6 -> v7 (node20 -> node24) All three workflow files are updated: - test-coverage.yml - docker-build-test.yml - build-and-push.yml
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.
…ush workflows
Add three GitHub Actions workflows:
test-coverage.yml: runs on every push/PR to main. Builds the dev container, generates Prisma client, and runs unit + integration tests with 100% coverage thresholds enforced by vitest config.
docker-build-test.yml: manual workflow (workflow_dispatch) that builds the production Docker image and runs a smoke test without publishing.
build-and-push.yml: automatic workflow triggered after test-coverage passes on main. Builds multi-arch (linux/amd64, linux/arm64) image and pushes to ghcr.io with latest, version, and sha- tags.
Removes the old build-push.yml which had no CI dependency.