-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (37 loc) · 1.2 KB
/
Copy pathtest-workflow.yml
File metadata and controls
47 lines (37 loc) · 1.2 KB
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: Playwright Test
on: [push, pull_request, workflow_dispatch]
jobs:
test:
runs-on: ubuntu-latest
permissions:
checks: write
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'npm' # Speeds up your runs by caching node_modules
- name: Install dependencies
run: npm ci # More reliable than 'npm install' for CI/CD
- name: Install Playwright Browsers
run: npx playwright install chromium
- name: Run Playwright tests
run: npx playwright test
env:
CI: 'true'
- name: Publish JUnit Test Results
if: success() || failure()
uses: dorny/test-reporter@v1
with:
name: JUnit Test Results
path: test-results/junit-results.xml
reporter: java-junit
- name: Upload Full Playwright Report (For Devs/Debugging)
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report-full
path: playwright-report/ # Uploads the whole folder (traces/videos included)
retention-days: 30