name: WebUi Tests on: pull_request: workflow_dispatch: jobs: build: runs-on: ubuntu-24.04 # pin for consistency (22.04 is also fine) steps: - name: Checkout uses: actions/checkout@v4 - name: Setup .NET uses: actions/setup-dotnet@v4 with: dotnet-version: 10.0.x - name: Cache NuGet uses: actions/cache@v4 with: path: ~/.nuget/packages key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/packages.lock.json') }} restore-keys: | ${{ runner.os }}-nuget- - name: Cache Playwright browsers (Chromium) uses: actions/cache@v4 with: path: ~/.cache/ms-playwright key: ${{ runner.os }}-pw-chromium-${{ hashFiles('**/*.csproj') }} restore-keys: | ${{ runner.os }}-pw-chromium- - name: Restore run: dotnet restore - name: Build run: dotnet build --no-restore --configuration Release # Prefer the Playwright script that comes with the NuGet package (no global tool install) - name: Install Playwright Browsers (Chromium only) shell: bash run: | pwsh Tests.E2e/bin/Release/net*/playwright.ps1 install --with-deps chromium - name: Build Docker Image run: | docker build \ -t rackpeek:ci \ -f RackPeek.Web/Dockerfile \ . - name: Run E2E Tests run: dotnet test Tests.E2e --configuration Release --verbosity normal