-
Notifications
You must be signed in to change notification settings - Fork 26
55 lines (52 loc) · 1.55 KB
/
playwright.yaml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: playwright
on:
push:
branches: [master]
paths:
- "playwright/**"
- ".github/workflows/playwright.yaml"
pull_request:
paths:
- "playwright/**"
env:
LAUNCHABLE_TOKEN: ${{ secrets.LAUNCHABLE_TOKEN_PLAYWRIGHT }}
LAUNCHABLE_DEBUG: 1
LAUNCHABLE_REPORT_ERROR: 1
jobs:
tests:
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: playwright
strategy:
matrix:
os: [ubuntu-latest]
browser: [chromium, firefox, webkit]
steps:
- uses: actions/checkout@v4
# for setup launchable command
- uses: actions/setup-python@v5
- name: Set up JDK 1.8
uses: actions/setup-java@v4
with:
java-version: 8
distribution: 'temurin'
- name: Install launchable CLI
run: |
pip install launchable
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Set up playwright
run: |
npm ci
npx playwright install --with-deps
- name: Record commits and build
run: 'launchable record build --name "$GITHUB_RUN_ID" --source ..' # care for working-directory path
- name: Subset
run: find tests/*.ts | launchable subset --confidence 80% --flavor browser=${{ matrix.browser }} playwright > launchable-subset.txt
- name: Run Playwright tests
run: npx playwright test --project=${{ matrix.browser }} $(cat launchable-subset.txt)
- name: Record
run: launchable record tests playwright --json report.json
if: always()