chore: update Vitest configuration and adjust e2e fallback tests

- Set minWorkers to 1 in vitest.shared.ts to optimize test execution.
- Modify e2e-fallback-tests.yaml to correctly set the PORT environment variable for backend startup.
- Change db-migrations.tsdown.config.ts to prevent cleaning of the dist directory, ensuring server files remain intact for Docker builds.
This commit is contained in:
mantrakp04 2026-06-23 12:35:08 -07:00
parent 902c92692b
commit dff79b05a8
3 changed files with 5 additions and 2 deletions

View File

@ -96,7 +96,7 @@ jobs:
- name: Start stack-backend on fallback port (8110)
uses: JarvusInnovations/background-action@2428e7b970a846423095c79d43f759abf979a635 # v1.0.7
with:
run: pnpm -C apps/backend run with-env:test next start --port 8110 &
run: PORT=8110 pnpm -C apps/backend run with-env:test pnpm run start &
wait-on: |
http://localhost:8110
tail: true

View File

@ -49,7 +49,9 @@ export default defineConfig({
inlineOnly: false,
// Externalize Node.js builtins so they're imported rather than shimmed
external: [...nodeBuiltins, ...externalPackages],
clean: true,
// Docker builds the backend server into the same dist directory before this
// script. Cleaning here deletes dist/server.mjs from the final image.
clean: false,
// Use banner to add createRequire for CommonJS modules that use require() for builtins
// The imported require is used by the shimmed __require2 function
banner: {

View File

@ -6,6 +6,7 @@ export default defineConfig({
test: {
watch: false,
pool: 'threads',
minWorkers: 1,
maxWorkers: 8,
include: ['**/*.test.{js,ts,jsx,tsx}'],
includeSource: ['**/*.{js,ts,jsx,tsx}'],