Restore to commit 74e578279624c6045ca440a3459ebfa1f8d54191
This commit is contained in:
24
scripts/run-smoke-tests.ps1
Normal file
24
scripts/run-smoke-tests.ps1
Normal file
@@ -0,0 +1,24 @@
|
||||
# Runs a set of smoke tests for the opencode CLI inside the running container
|
||||
param(
|
||||
[string]$ContainerName = 'wordpress-plugin-ai-builder'
|
||||
)
|
||||
|
||||
$cmds = @(
|
||||
'pwsh --version',
|
||||
'node --version',
|
||||
'opencode --version',
|
||||
'opencode help'
|
||||
# verify our helper alias/function is loaded (source the profile file manually to simulate login)
|
||||
'. /root/.config/powershell/Microsoft.PowerShell_profile.ps1; Get-Command github'
|
||||
)
|
||||
|
||||
foreach ($c in $cmds) {
|
||||
Write-Host "Running: $c"
|
||||
docker compose exec $ContainerName pwsh -NoProfile -Command $c
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Error "Command failed: $c"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "Smoke tests passed." -ForegroundColor Green
|
||||
Reference in New Issue
Block a user