-
-
Notifications
You must be signed in to change notification settings - Fork 619
59 lines (47 loc) · 1.83 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
name: 🎭 Playwright Tests
on:
pull_request:
branches: [dev]
jobs:
e2e-test:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps chromium
- name: Build E2E Client
run: pnpm build:e2e
- name: Run Playwright Tests
run: pnpm exec playwright test
- name: 🚀 Deploy to Vercel
uses: amondnet/vercel-action@v25
id: vercel-e2e-report
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.ORG_ID }}
vercel-project-id: ${{ secrets.PROJECT_ID_E2E}}
- name: Generate Playwright Report
uses: daun/playwright-report-summary@v3
if: always()
with:
report-file: playwright-report.json
custom-info: 'For more information, [see full report](${{ steps.vercel-e2e-report.outputs.preview-url }})'
- name: Set Label
uses: actions/github-script@v6
if: failure()
with:
script: |
const { owner, repo } = context.repo;
const prNumber = context.payload.pull_request.number;
const labelsToAdd = ['qa:rejected'];
await github.rest.issues.addLabels({
owner,
repo,
issue_number: prNumber,
labels: labelsToAdd,
});