Setup Playwright.NET Action #48
Workflow file for this run
This file contains hidden or 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: Orchard Core Contrib Testing - Build | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| paths-ignore: | |
| - 'README.md' | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| env: | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| token: ${{ secrets.OCC_TOKEN }} | |
| - name: Setup .NET Core | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: | | |
| 8.0.* | |
| 10.0.* | |
| - name: Install Dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --configuration Release --no-restore | |
| - name: Install Playwright browsers | |
| shell: pwsh | |
| run: | | |
| $playwrightScripts = Get-ChildItem "test/OrchardCoreContrib.Testing.UI.Tests/bin/Release/*/playwright.ps1" | | |
| Select-Object -ExpandProperty FullName | |
| if ($null -eq $playwrightScripts -or $playwrightScripts.Count -eq 0) { | |
| throw "Unable to find any playwright.ps1 script in the built UI test output." | |
| } | |
| foreach ($playwrightScript in $playwrightScripts) { | |
| & $playwrightScript install | |
| } | |
| - name: Test | |
| run: | | |
| dotnet test test/OrchardCoreContrib.Testing.Tests/OrchardCoreContrib.Testing.Tests.csproj --configuration Release --no-build --verbosity normal | |
| dotnet test test/OrchardCoreContrib.Testing.UI.Tests/OrchardCoreContrib.Testing.UI.Tests.csproj --configuration Release --no-build --verbosity normal |