-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (48 loc) · 1.47 KB
/
patchright_test.yml
File metadata and controls
58 lines (48 loc) · 1.47 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
46
47
48
49
50
51
52
53
54
55
56
57
58
# Patchright .NET Test Workflow
#
# This workflow runs tests on pull requests and pushes.
# It uses the latest compatible Patchright driver version.
name: Test Patchright .NET
on:
push:
branches: [master]
pull_request:
branches: [master]
env:
DOTNET_VERSION: '10.0.x'
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
test:
name: Run Tests
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Get versions
id: versions
uses: ./.github/actions/get-versions
- name: Run test script
shell: pwsh
run: |
$driverVersion = "${{ steps.versions.outputs.driver_version }}"
if ($driverVersion) {
Write-Host "Running tests with driver version: $driverVersion" -ForegroundColor Cyan
.\test.ps1 -DriverVersion $driverVersion
} else {
Write-Host "Running tests with default driver version" -ForegroundColor Cyan
.\test.ps1
}
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: |
playwright-dotnet/src/Playwright.Tests/TestResults/
retention-days: 7
if-no-files-found: ignore