-
Notifications
You must be signed in to change notification settings - Fork 245
73 lines (69 loc) · 3.12 KB
/
nuget-package-tests.yml
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
73
name: NuGet Package Smoke Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test-nuget-packages:
name: Nuget Tests on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Install prerequisites and download drivers
shell: bash
run: ./build.sh --download-driver
# .NET internally has two sources when we install a tool with --add-source
# so our local version needs to be higher that it gets priority over the remote one.
# Also it should not include any pre-release versions (include next).
- name: Bump Playwright versions
shell: bash
run: |
xml_file_path="./src/Playwright.CLI/Playwright.CLI.csproj"
xml_file_contents=$(cat "${xml_file_path}")
xml_file_contents=$(echo "${xml_file_contents}" | sed "s|<AssemblyVersion>.*</AssemblyVersion>|<AssemblyVersion>99.99.99</AssemblyVersion>|")
xml_file_contents=$(echo "${xml_file_contents}" | sed "s|<PackageVersion>.*</PackageVersion>|<PackageVersion>99.99.99-next-1</PackageVersion>|")
echo "${xml_file_contents}" > "${xml_file_path}"
xml_file_path="./src/Common/Version.props"
xml_file_contents=$(cat "${xml_file_path}")
xml_file_contents=$(echo "${xml_file_contents}" | sed "s|<AssemblyVersion>.*</AssemblyVersion>|<AssemblyVersion>1.99.99</AssemblyVersion>|")
xml_file_contents=$(echo "${xml_file_contents}" | sed "s|<PackageVersion>.*</PackageVersion>|<PackageVersion>1.99.99</PackageVersion>|")
echo "${xml_file_contents}" > "${xml_file_path}"
- name: Build Playwright.CLI
run: |
dotnet build src/Playwright.CLI/
dotnet pack src/Playwright.CLI/ -o ./src/Playwright.LocalNugetTest/nupkg
- name: Install Playwright CLI
run: dotnet tool install --global --version "*-next*" Microsoft.Playwright.CLI
working-directory: ./src/Playwright.LocalNugetTest/
- name: Build Playwright
run: |
dotnet build ./src/Playwright/
dotnet pack ./src/Playwright/ -o ./src/Playwright.LocalNugetTest/nupkg
- name: Build Playwright.NUnit
run: |
dotnet build ./src/Playwright.NUnit/
dotnet pack ./src/Playwright.NUnit/ -o ./src/Playwright.LocalNugetTest/nupkg
- name: Build Playwright.TestAdapter
run: |
dotnet build ./src/Playwright.TestAdapter/
dotnet pack ./src/Playwright.TestAdapter/ -o ./src/Playwright.LocalNugetTest/nupkg
- name: Build Playwright.LocalNugetTest
run: dotnet build
working-directory: ./src/Playwright.LocalNugetTest/
- name: Install browsers and dependencies
run: playwright install --with-deps
working-directory: ./src/Playwright.LocalNugetTest/
- name: Run Tests
run: dotnet test
working-directory: ./src/Playwright.LocalNugetTest/