-
Notifications
You must be signed in to change notification settings - Fork 85
45 lines (39 loc) · 1.37 KB
/
playwright-audit.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
name: Audit a Playwright test
run-name: ${{ github.actor }} is running ${{ inputs.component }} test${{ inputs.line-number && format(' on line {0}', inputs.line-number) || 's' }} ${{ inputs.repeat-each }} times
on:
workflow_dispatch:
inputs:
repeat-each:
default: 5
type: number
description: The number of times to repeat the test
component:
required: true
type: string
description: "Name of the component to test. (Examples: `button`, `anchor-navigation`, etc.)"
line-number:
type: number
description: "Optional file line number of a specific test to run. (Example: `10`)"
jobs:
test:
timeout-minutes: 20
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.47.0-jammy
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: "npm"
node-version: 20
- name: Install Dependencies
run: npm ci
- name: Run Playwright tests
run: npm run test:ct -- "/${{ inputs.component }}.pw.tsx${{ inputs.line-number && format(':{0}', inputs.line-number) || '' }}" --workers=1 --repeat-each=${{ inputs.repeat-each }}
env:
HOME: /root
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/