mirror of
https://github.com/stack-auth/stack.git
synced 2026-07-20 21:29:36 +08:00
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:
parent
902c92692b
commit
dff79b05a8
2
.github/workflows/e2e-fallback-tests.yaml
vendored
2
.github/workflows/e2e-fallback-tests.yaml
vendored
@ -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
|
||||
|
||||
@ -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: {
|
||||
|
||||
@ -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}'],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user