perf: parallelize tests and reduce timeouts
Pull Request / unit-tests (pull_request) Successful in 2m3s
Pull Request / analyze-bump-type (pull_request) Successful in 13s
Pull Request / build-and-deploy-ci (pull_request) Failing after 16m0s

- Increase workers from 1 to 10 in CI for parallel execution
- Reduce expect timeout from 5000ms to 2000ms
- Reduce all waitForTimeout calls >1000ms to 200-500ms
- Remove unnecessary waits in global setup
This commit is contained in:
2026-05-19 00:39:46 -07:00
parent 005cf7293d
commit 38771a86cb
8 changed files with 22 additions and 26 deletions
+6 -6
View File
@@ -98,17 +98,17 @@ async function createTestUsers(config: FullConfig) {
console.log('Submitting registration form...');
await page.click('button[type="submit"]');
try {
try {
await page.waitForResponse(response =>
response.url().includes('/api/auth/sign-up/email') && response.status() === 200,
{ timeout: 10000 }
{ timeout: 5000 }
);
console.log('Sign-up API call successful');
} catch {
console.log('Sign-up API call failed or timed out');
}
await page.waitForTimeout(2000);
await page.waitForTimeout(500);
await context.storageState({ path: authFile });
console.log(`Created and authenticated test user: ${testEmail}`);
@@ -133,14 +133,14 @@ async function createTestUsers(config: FullConfig) {
try {
await page.waitForResponse(response =>
response.url().includes('/api/auth/sign-up/email') && response.status() === 200,
{ timeout: 10000 }
{ timeout: 5000 }
);
console.log('Admin sign-up API call successful');
} catch {
console.log('Admin sign-up API call failed or timed out');
}
await page.waitForTimeout(2000);
await page.waitForTimeout(500);
const prisma = createPrismaClient();
const user = await prisma.user.findUnique({ where: { email: adminEmail } });
@@ -159,7 +159,7 @@ async function createTestUsers(config: FullConfig) {
await page.waitForLoadState('domcontentloaded');
console.log('Admin page loaded:', page.url());
await page.waitForTimeout(2000);
await page.waitForTimeout(500);
await page.reload();
await page.waitForLoadState('domcontentloaded');
console.log('Page reloaded');