Add repo Playwright smoke setup
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user