-
Notifications
You must be signed in to change notification settings - Fork 3
35 lines (34 loc) · 1.14 KB
/
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
name: E2E
on: [deployment_status]
jobs:
e2e:
# only runs this job on successful deploy
if: github.event.deployment_status.state == 'success'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# fetch all commits so we can find the branch
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18.x
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium
- name: Run Playwright tests
run: yarn e2e -- --grep-invert @noci
env:
E2E_BASE_URL: ${{ github.event.deployment_status.target_url }}
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
- name: Upload E2E artifacts to job
uses: actions/upload-artifact@v3
if: failure()
with:
name: e2e-screenshots
path: |
e2e-screenshots
playwright-report
# https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#job-status-check-functions