diff --git a/.github/workflows/e2e-fallback-tests.yaml b/.github/workflows/e2e-fallback-tests.yaml index d4eebfe90..e2190e627 100644 --- a/.github/workflows/e2e-fallback-tests.yaml +++ b/.github/workflows/e2e-fallback-tests.yaml @@ -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 diff --git a/apps/backend/scripts/db-migrations.tsdown.config.ts b/apps/backend/scripts/db-migrations.tsdown.config.ts index aa9fa4c9b..33ef847f4 100644 --- a/apps/backend/scripts/db-migrations.tsdown.config.ts +++ b/apps/backend/scripts/db-migrations.tsdown.config.ts @@ -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: { diff --git a/vitest.shared.ts b/vitest.shared.ts index 3824e5b30..705a3015c 100644 --- a/vitest.shared.ts +++ b/vitest.shared.ts @@ -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}'],