Skip to content

Commit 7eda5ed

Browse files
committed
Add playwright browser caching
De-flake a test, hopefully
1 parent 486023e commit 7eda5ed

2 files changed

Lines changed: 15 additions & 5 deletions

File tree

.github/workflows/ci-testing.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,21 @@ jobs:
1313
uses: actions/setup-node@v4
1414
with:
1515
node-version: 22
16+
cache: npm
1617
- run: sudo apt-get install xvfb
17-
- run: npm install
18-
- run: npx playwright install --with-deps
18+
- run: npm ci
19+
- name: Cache Playwright browsers
20+
id: playwright-cache
21+
uses: actions/cache@v4
22+
with:
23+
path: ~/.cache/ms-playwright
24+
key: playwright-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
25+
- run: npx playwright install --with-deps
26+
if: steps.playwright-cache.outputs.cache-hit != 'true'
27+
- run: npx playwright install-deps
28+
if: steps.playwright-cache.outputs.cache-hit == 'true'
1929
- run: npm install -g grunt-cli
2030
- run: grunt default
2131
- run: xvfb-run --auto-servernum -- npx playwright test --grep-invert="popupTabNavigation\.test\.js|layerContextMenuKeyboard\.test\.js" --workers=1 --retries=3
22-
# - run: xvfb-run --auto-servernum -- npx playwright test --grep="popupTabNavigation\.test\.js|layerContextMenuKeyboard\.test\.js" --workers=1 --retries=3
23-
# - run: xvfb-run --auto-servernum -- npm run jest
2432
env:
2533
CI: true

test/e2e/api/events/map-change-event.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ test.describe('Map-change event are only fired when layers/extents are checked o
1111
page =
1212
context.pages().find((page) => page.url() === 'about:blank') ||
1313
(await context.newPage());
14-
await page.goto('events/map-change-event.html');
14+
await page.goto('events/map-change-event.html', {
15+
waitUntil: 'networkidle'
16+
});
1517
});
1618

1719
test.afterAll(async function () {

0 commit comments

Comments
 (0)