1- name : Playwright Test
1+ name : Playwright Tests
22
33on :
44 workflow_dispatch :
55 push :
66 tags :
77 - v*
88 branches : [main]
9-
9+ pull_request :
10+ branches : [main]
1011
1112jobs :
12- build :
13+ test :
14+ timeout-minutes : 60
15+ runs-on : ubuntu-latest
16+
1317 strategy :
1418 fail-fast : false
1519 matrix :
16- os : [macos-latest, windows-latest, ubuntu-latest]
1720 node-version : [20.x, 22.x]
18- # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
19-
20- runs-on : ${{ matrix.os }}
2121
2222 steps :
2323 - name : Checkout repository
24- uses : actions/checkout@v5
24+ uses : actions/checkout@v4
2525 with :
26- fetch-depth : 1 # Fetch only the latest commit for faster builds
27-
28- - name : Install Go
29- uses : actions/setup-go@v6
30- with :
31- go-version : " >1.0.0"
32- cache : true
26+ fetch-depth : 1
3327
3428 - name : Setup Node.js ${{ matrix.node-version }}
3529 uses : actions/setup-node@v4
@@ -38,14 +32,36 @@ jobs:
3832 cache : ' npm'
3933 cache-dependency-path : ' **/package-lock.json'
4034
41- - name : Perform clean install of npm
35+ - name : Install Go
36+ uses : actions/setup-go@v6
37+ with :
38+ go-version : " stable"
39+ cache : true
40+
41+ - name : Install dependencies
4242 run : npm ci
4343
4444 - name : Install Playwright Browsers
45- run : npx playwright install
45+ run : npx playwright install --with-deps
4646
4747 - name : Run tests
4848 run : npm run test
4949
5050 - name : Run Playwright tests
51- run : npm run test:playwright
51+ run : npx playwright test
52+
53+ - name : Upload Playwright Report
54+ uses : actions/upload-artifact@v4
55+ if : ${{ !cancelled() }}
56+ with :
57+ name : playwright-report-${{ matrix.node-version }}
58+ path : playwright-report/
59+ retention-days : 30
60+
61+ - name : Upload Test Results
62+ uses : actions/upload-artifact@v4
63+ if : ${{ !cancelled() }}
64+ with :
65+ name : test-results-${{ matrix.node-version }}
66+ path : test-results/
67+ retention-days : 30
0 commit comments