-
Notifications
You must be signed in to change notification settings - Fork 4
66 lines (56 loc) · 1.77 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Playwright E2E
on:
workflow_dispatch:
inputs:
deployment_url:
type: string
description: "The URL of the deployment to test"
required: true
workflow_call:
inputs:
deployment_url:
type: string
description: "The URL of the deployment to test"
required: true
secrets:
TURBO_TOKEN:
required: true
VERCEL_TOKEN:
required: true
FERN_TOKEN:
required: true
jobs:
playwright:
runs-on: macos-latest
permissions: write-all # required for the playwright-report-summary action
if: inputs.deployment_url != ''
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install
- name: Install Fern CLI (used for docs e2e)
run: pnpm i -g fern-api@latest
- name: Fetch domains
run: pnpm vercel-scripts domains.txt app.buildwithfern.com --token=${{ secrets.VERCEL_TOKEN }}
- name: Install Playwright Browsers
run: pnpm exec playwright install chromium
- name: Build Playwright Test Fixtures
run: pnpm playwright:build
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: buildwithfern
- name: Run Playwright tests
run: pnpm exec playwright test playwright --workers 6 --reporter json,html
env:
PLAYWRIGHT_JSON_OUTPUT_NAME: results.json
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
DEPLOYMENT_URL: ${{ inputs.deployment_url }}
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30
- uses: daun/playwright-report-summary@v3
if: always()
with:
report-file: results.json