Add repo Playwright smoke setup

This commit is contained in:
2026-04-03 00:39:42 +02:00
parent 48439fd21d
commit 9b9927084b
8 changed files with 209 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
param(
[switch]$SkipDotnetRestore,
[switch]$SkipBuild
[switch]$SkipBuild,
[switch]$SkipPlaywright
)
Set-StrictMode -Version Latest
@@ -36,6 +37,14 @@ try {
}
}
Invoke-Step -Name "Restore Node dependencies" -Action {
npm ci
}
Invoke-Step -Name "Ensure Playwright browser" -Action {
npm exec playwright install chromium
}
Invoke-Step -Name "Run tests" -Action {
if ($SkipBuild) {
dotnet test RpgRoller.Tests/RpgRoller.Tests.csproj --verbosity normal --collect:"XPlat Code Coverage" --settings RpgRoller.Tests/coverlet.runsettings
@@ -49,6 +58,12 @@ try {
pwsh ./scripts/check-coverage.ps1 -MinLineRate 0.90 -MinBranchRate 0.70
}
if (-not $SkipPlaywright) {
Invoke-Step -Name "Run Playwright smoke test" -Action {
pwsh ./scripts/run-playwright.ps1
}
}
Write-Host "CI checks passed."
}
finally {