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
@@ -315,7 +315,7 @@ ${tournament.id},2,1,${player1.name},${player3.name},10,${player2.name},${player
await page.click('button[type="submit"]');
// Wait for upload to complete
await page.waitForTimeout(3000);
await page.waitForTimeout(1000);
// Check for any error messages
const uploadContentAfter = await page.content();
@@ -328,11 +328,11 @@ ${tournament.id},2,1,${player1.name},${player3.name},10,${player2.name},${player
// Navigate back to upload page for second match
await page.goto('/admin/matches/upload');
await page.waitForLoadState('domcontentloaded');
await page.waitForTimeout(2000);
await page.waitForTimeout(500);
// Re-select the tournament for the second upload
await page.waitForSelector('select#tournament', { timeout: 5000 });
await page.waitForTimeout(1000); // Wait for tournaments to load
await page.waitForSelector('select#tournament', { timeout: 3000 });
await page.waitForTimeout(200); // Wait for tournaments to load
const tournamentSelect2 = await page.locator('select#tournament');
const currentSelection = await tournamentSelect2.inputValue();
@@ -351,10 +351,10 @@ ${tournament.id},2,1,${player1.name},${player3.name},10,${player2.name},${player
await page.setInputFiles('input[type="file"]', tmpFile2);
await page.waitForTimeout(500);
await page.click('button[type="submit"]');
await page.waitForTimeout(2000);
await page.waitForTimeout(500);
fs.unlinkSync(tmpFile2);
await page.waitForTimeout(2000);
await page.waitForTimeout(500);
// Verify ratings after multiple matches
const updatedPlayer1 = await prisma.player.findUnique({