chore(vitest): exclude packages/e2e/** from root unit test suite

This commit is contained in:
yiling
2026-07-15 11:40:57 +08:00
parent 83c427e646
commit d524a81ecd
6 changed files with 41 additions and 35 deletions
+17 -19
View File
@@ -7,28 +7,26 @@ export async function setup() {
// 1. Start Postgres DB container & run migrations
await dbSetup()
// 2. Start Temporal Dev Server container if running in temporal mode
if (process.env.WORKFLOW_EXECUTOR === 'temporal') {
console.log('Starting Temporal Dev Server container using testcontainers...')
try {
temporalContainer = await new GenericContainer('temporalio/temporal:latest')
.withExposedPorts(7233, 8233)
.withCommand(['server', 'start-dev', '--ip', '0.0.0.0'])
.start()
// 2. Start Temporal Dev Server container for the test suite
console.log('Starting Temporal Dev Server container using testcontainers...')
try {
temporalContainer = await new GenericContainer('temporalio/temporal:latest')
.withExposedPorts(7233, 8233)
.withCommand(['server', 'start-dev', '--ip', '0.0.0.0'])
.start()
const host = temporalContainer.getHost()
const mappedPort = temporalContainer.getMappedPort(7233)
const address = `${host}:${mappedPort}`
const host = temporalContainer.getHost()
const mappedPort = temporalContainer.getMappedPort(7233)
const address = `${host}:${mappedPort}`
process.env.TEMPORAL_ADDRESS = address
console.log(`Temporal Dev Server container started. Address: ${address}`)
process.env.TEMPORAL_ADDRESS = address
console.log(`Temporal Dev Server container started. Address: ${address}`)
// Brief sleep to ensure temporal dev server is fully ready to accept gRPC clients
await new Promise((resolve) => setTimeout(resolve, 2000))
} catch (err) {
console.error('Failed to start Temporal Dev Server container:', err)
throw err
}
// Brief sleep to ensure temporal dev server is fully ready to accept gRPC clients
await new Promise((resolve) => setTimeout(resolve, 2000))
} catch (err) {
console.error('Failed to start Temporal Dev Server container:', err)
throw err
}
}