-
-
Notifications
You must be signed in to change notification settings - Fork 842
47 lines (44 loc) · 1.27 KB
/
playwright-e2e.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
42
43
44
45
46
47
name: Playwright e2e Tests
on:
push:
branches: [main]
pull_request_target:
types: [labeled, opened, synchronize, reopened]
concurrency:
group: environment-${{ github.ref }}
cancel-in-progress: true
jobs:
playwright-run:
runs-on: ubuntu-latest
if: github.repository == 'reactplay/react-play'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Packages
run: |
npm install --legacy-peer-deps
# Install NPM dependencies, cache them correctly
# and run all Playwright tests
- name: Playwright run
uses: actions/checkout@v4
with:
install-command: |
npm install --legacy-peer-deps
start: npm start
wait-on: "http://localhost:3000"
browser: chrome
env:
# pass GitHub token to detect new build vs re-run build
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: yarn e2e
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30