Skip to content

Commit 81e3820

Browse files
authored
Tweak playwright config (#1758)
* wait why would we not run tests in parallel in CI * curious what it does when we don't say anything * tell github actions to use 100% of available cores
1 parent 6582b24 commit 81e3820

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.github/workflows/lintBuildTest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
if: steps.playwright-cache.outputs.cache-hit == 'true'
9797
run: npx playwright install-deps
9898
- name: Run Playwright browser tests
99-
run: npx playwright test --workers=2 --project=${{matrix.browser}}
99+
run: npx playwright test --project=${{matrix.browser}}
100100
- uses: actions/upload-artifact@v3
101101
if: always()
102102
with:

app/test/e2e/image-upload.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ test.describe('Image upload', () => {
186186
// now let's try canceling by clicking out on the background over the side modal
187187
await page.getByLabel('4096').click()
188188

189-
await sleep(100)
189+
await sleep(300)
190190

191191
// without the onFocusOutside fix this is a higher number
192192
expect(confirmCount).toEqual(2)

playwright.config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ import { devices } from '@playwright/test'
1414
const config: PlaywrightTestConfig = {
1515
testDir: './app/test/e2e',
1616
testMatch: /\.e2e\.ts/,
17-
/* Fail the build on CI if you accidentally left test.only in the source code. */
17+
// Fail the build on CI if you accidentally left test.only in the source code
1818
forbidOnly: !!process.env.CI,
19-
/* Retry on CI only */
19+
// Retry on CI only
2020
retries: process.env.CI ? 2 : 0,
21-
/* Opt out of parallel tests on CI. */
22-
workers: process.env.CI ? 1 : undefined,
21+
// use all available cores (2) on github actions. default is 50%, use that locally
22+
workers: process.env.CI ? '100%' : undefined,
2323
timeout: 2 * 60 * 1000, // 2 minutes, surely overkill
2424
fullyParallel: true,
2525
use: {

0 commit comments

Comments
 (0)