Skip to content

Commit ac3b507

Browse files
Add GitHub Actions workflow for Playwright .NET tests
1 parent 1a6bfaa commit ac3b507

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

.github/workflows/dotnet-playwright.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Playwright Tests
1+
name: Playwright Tests (.NET)
22

33
on:
44
push:
@@ -7,7 +7,7 @@ on:
77
branches: [ "main" ]
88

99
jobs:
10-
build:
10+
build-and-test:
1111
runs-on: ubuntu-latest
1212

1313
steps:
@@ -22,8 +22,20 @@ jobs:
2222
- name: Restore dependencies
2323
run: dotnet restore
2424

25-
- name: Install Playwright browsers
26-
run: npx playwright install --with-deps
25+
- name: Build project
26+
run: dotnet build --configuration Release --no-restore
27+
28+
- name: Install Playwright browsers for .NET
29+
run: pwsh bin/Debug/net8.0/playwright.ps1 install --with-deps
2730

2831
- name: Run Playwright Tests
29-
run: dotnet test --logger "trx;LogFileName=test_results.trx"
32+
run: dotnet test --configuration Release --logger "trx;LogFileName=test_results.trx"
33+
34+
- name: Upload Test Results
35+
uses: actions/upload-artifact@v3
36+
with:
37+
name: playwright-test-results
38+
path: TestResults/
39+
40+
- name: Print working directory and files
41+
run: ls -R

0 commit comments

Comments
 (0)