Skip to content

Commit 8e6770a

Browse files
authored
Create playwright-test-runner.yml
1 parent 9b9b76e commit 8e6770a

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: PlaywrightTestRunner
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
test:
7+
timeout-minutes: 15
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
# Prevent running in parallel
11+
max-parallel: 1
12+
matrix:
13+
# options (can be multiple) [ubuntu-latest, windows-latest, macos-latest]
14+
os: [ubuntu-latest]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Setup .NET
20+
uses: actions/setup-dotnet@v4
21+
with:
22+
dotnet-version: 10.0.x # Match your project version
23+
24+
- name: Install dotnet wasm tools
25+
run: dotnet workload install wasm-tools
26+
27+
- name: Build PlaywrightTestRunner
28+
run: dotnet build ./PlaywrightTestRunner/PlaywrightTestRunner.csproj
29+
30+
- name: Install Playwright dependencies
31+
# Only needed on Linux
32+
if: ${{ runner.os == 'Linux' }}
33+
run: pwsh ./PlaywrightTestRunner/bin/Debug/net10.0/playwright.ps1 install-deps
34+
35+
- name: Install Playwright
36+
run: pwsh ./PlaywrightTestRunner/bin/Debug/net10.0/playwright.ps1 install
37+
38+
- name: Set execute flag on _test script
39+
shell: bash
40+
run: chmod +x ./PlaywrightTestRunner/_test.sh
41+
42+
- name: Run PlaywrightTestRunner
43+
shell: bash
44+
run: ./PlaywrightTestRunner/_test.sh
45+
46+
- name: Upload Playwright logs
47+
if: failure()
48+
uses: actions/upload-artifact@v4.3.2
49+
with:
50+
name: playwright
51+
retention-days: 2
52+
path: |
53+
./PlaywrightTestRunner/bin/Debug/net10.0/playwright-traces/**/*.*

0 commit comments

Comments
 (0)