-
Notifications
You must be signed in to change notification settings - Fork 7
72 lines (60 loc) · 1.84 KB
/
Copy pathpatchright_test.yml
File metadata and controls
72 lines (60 loc) · 1.84 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# 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]
workflow_dispatch:
inputs:
driver_version:
description: 'Driver version to test (leave blank to use get-versions output)'
required: false
type: string
concurrency:
group: build-and-test
cancel-in-progress: false
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 = "${{ github.event.inputs.driver_version }}"
if (-not $driverVersion) {
$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