feat: expand companion platform, device controls, and memoir workflows
ci / verify (push) Canceled after 0s
ci / verify (push) Canceled after 0s
Add customer and operator login, BLE provisioning, device fleet controls, call memory, memoir generation, and refreshed family and maintenance portals. Include API contracts, migrations, firmware sources, tests, assets, and deployment documentation.
This commit is contained in:
@@ -1,16 +1,22 @@
|
||||
param([string[]]$Packages = @('onboarding','devicereset','opsdevice','hardwareprovision','idempotency','httpapi','orchestration','saas','outbox','privacy'))
|
||||
param(
|
||||
[string[]]$Packages = @('onboarding','devicereset','opsdevice','hardwareprovision','idempotency','httpapi','orchestration','saas','outbox','privacy'),
|
||||
[switch]$VerboseTests,
|
||||
[string]$OutputDirectory = '.tmp-onboarding'
|
||||
)
|
||||
$ErrorActionPreference='Continue'
|
||||
Set-Location (Split-Path $PSScriptRoot -Parent)
|
||||
$taskTemplate='codex_onboarding_template_'+[Guid]::NewGuid().ToString('N').Substring(0,12)
|
||||
$taskDatabases=[System.Collections.Generic.List[string]]::new()
|
||||
New-Item -ItemType Directory -Force -Path '.tmp-onboarding' | Out-Null
|
||||
$taskPreviousDatabase = $env:TEST_DATABASE_URL
|
||||
$taskPreviousRedis = $env:TEST_REDIS_ADDR
|
||||
New-Item -ItemType Directory -Force -Path $OutputDirectory | Out-Null
|
||||
try {
|
||||
docker compose exec -T postgres psql -U voice -d postgres -v ON_ERROR_STOP=1 -c "CREATE DATABASE $taskTemplate" | Out-Null
|
||||
if($LASTEXITCODE -ne 0){throw 'Test database creation failed'}
|
||||
$taskDatabases.Add($taskTemplate)
|
||||
docker compose run --rm --no-deps migrate -path=/migrations "-database=postgres://voice:voice_dev_only@postgres:5432/$taskTemplate`?sslmode=disable" up 2>&1 | Out-File '.tmp-onboarding/migration-validation.log'
|
||||
docker compose run --rm --no-deps migrate -path=/migrations "-database=postgres://voice:voice_dev_only@postgres:5432/$taskTemplate`?sslmode=disable" up 2>&1 | Out-File (Join-Path $OutputDirectory 'migration-validation.log')
|
||||
if($LASTEXITCODE -ne 0){throw 'Migration validation failed'}
|
||||
docker compose run --rm --no-deps -e PGPASSWORD=voice_dev_only seed psql -h postgres -U voice -d $taskTemplate -v ON_ERROR_STOP=1 -f /fixtures/local_seed.sql 2>&1 | Out-File '.tmp-onboarding/seed-validation.log'
|
||||
docker compose run --rm --no-deps -e PGPASSWORD=voice_dev_only seed psql -h postgres -U voice -d $taskTemplate -v ON_ERROR_STOP=1 -f /fixtures/local_seed.sql 2>&1 | Out-File (Join-Path $OutputDirectory 'seed-validation.log')
|
||||
if($LASTEXITCODE -ne 0){throw 'Seed validation failed'}
|
||||
foreach($taskPackage in $Packages) {
|
||||
if($taskPackage -notmatch '^[a-z]+$'){throw 'Invalid package'}
|
||||
@@ -20,11 +26,15 @@ try {
|
||||
$taskDatabases.Add($taskDatabase)
|
||||
$env:TEST_DATABASE_URL="postgres://voice:voice_dev_only@127.0.0.1:55432/$taskDatabase`?sslmode=disable"
|
||||
$env:TEST_REDIS_ADDR='127.0.0.1:56379'
|
||||
go test -count=1 -p 1 "./internal/$taskPackage" 2>&1 | Tee-Object ".tmp-onboarding/integration-$taskPackage.log"
|
||||
$taskGoArgs = @('test', '-count=1', '-p', '1')
|
||||
if ($VerboseTests) { $taskGoArgs += '-v' }
|
||||
$taskGoArgs += "./internal/$taskPackage"
|
||||
go @taskGoArgs 2>&1 | Tee-Object (Join-Path $OutputDirectory "integration-$taskPackage.log")
|
||||
if($LASTEXITCODE -ne 0){throw "Integration failed: $taskPackage"}
|
||||
}
|
||||
} finally {
|
||||
Remove-Item Env:TEST_DATABASE_URL -ErrorAction SilentlyContinue
|
||||
$env:TEST_DATABASE_URL = $taskPreviousDatabase
|
||||
$env:TEST_REDIS_ADDR = $taskPreviousRedis
|
||||
foreach($taskDatabase in $taskDatabases) {
|
||||
# Only databases created by this invocation can be removed.
|
||||
if($taskDatabase -match '^codex_onboarding_(template|test)_[0-9a-f]{12}$'){
|
||||
|
||||
Reference in New Issue
Block a user