-
Notifications
You must be signed in to change notification settings - Fork 356
41 lines (41 loc) · 1.28 KB
/
playwright.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Integration Tests (Playwright)
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
playwright-run:
name: Test (${{ matrix.shard }})
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shard: ['1/5', '2/5', '3/5', '4/5', '5/5']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Install Playwright
run: npx playwright install --with-deps chromium
- name: Run build
run: yarn build
- name: Run your tests
run: |
# Retry 2 times before the steps actually fails
(echo "===== Playwright run attempt: 1 ====" && yarn run playwright:test --workers 2 --shard=${{ matrix.shard }}) || \
(echo "===== Playwright run attempt: 2 ====" && yarn run playwright:test --workers 2 --shard=${{ matrix.shard }}) || \
(echo "==== Playwright run attempt ====" && exit 1)
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-test-results
path: playwright/test-results/