Skip to content

[ADR-161] Working PR for Layout customization backend service #344

[ADR-161] Working PR for Layout customization backend service

[ADR-161] Working PR for Layout customization backend service #344

name: Build and Test
on:
push:
branches:
- main
pull_request:
branches:
- main
- 'feature/*'
jobs:
build-and-test:
runs-on: windows-latest
permissions:
contents: read
checks: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0 # Required for Nerdbank.GitVersioning
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.0.x'
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore /warnaserror
- name: Install Chromium browser for Playwright headless tests
shell: pwsh
run: pwsh ./src/AdaptiveRemote.Headless/bin/Debug/net10.0/playwright.ps1 install chromium
- name: Unit Tests
run: dotnet test --no-build --verbosity normal --logger trx --results-directory "TestResults" --filter "FullyQualifiedName!~EndToEndTest"
- name: E2E Tests
run: dotnet test --no-build --verbosity normal --logger trx --results-directory "TestResults" --filter "FullyQualifiedName~EndToEndTest" -m:1
if: always()
- name: Upload E2E Test Logs
uses: actions/upload-artifact@v6
if: always()
with:
name: e2e-test-logs
path: |
TestResults/**/*.log
retention-days: 30
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action/windows@v2
if: always()
with:
files: |
TestResults/**/*.trx