fix(xunit): support netstandard2.0 #3413
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |