@@ -332,12 +332,228 @@ jobs:
332332 check_name : Integration Tests
333333 comment_mode : off
334334
335+ # -------------------------------------------------------------------------------------------------
336+ # Smoke Tests — start each platform binary and verify HTTP health before any release
337+ # -------------------------------------------------------------------------------------------------
338+ smoke-test-linux-amd64 :
339+ needs : [linux-build]
340+ runs-on : ubuntu-24.04
341+ steps :
342+ - name : Download binary
343+ uses : actions/download-artifact@v4
344+ with :
345+ name : flapi-linux-amd64
346+ path : smoke
347+
348+ - name : Start server and health-check
349+ env :
350+ SMOKE_CONFIG : |
351+ project-name: smoke-test
352+ project-description: CI smoke test
353+ template:
354+ path: ./sqls
355+ duckdb:
356+ db-path: ./smoke-test.duckdb
357+ access-mode: READ_WRITE
358+ threads: 1
359+ max-memory: 256MB
360+ server:
361+ port: 18080
362+ run : |
363+ cd smoke
364+ chmod +x flapi
365+ mkdir -p sqls
366+ printf '%s' "$SMOKE_CONFIG" > smoke-config.yaml
367+
368+ DATAZOO_DISABLE_TELEMETRY=1 ./flapi -c smoke-config.yaml --config-service \
369+ > server.log 2>&1 &
370+ FLAPI_PID=$!
371+
372+ healthy=false
373+ for i in $(seq 1 30); do
374+ sleep 1
375+ if curl -sf --max-time 3 http://localhost:18080/api/v1/_config/health > /dev/null; then
376+ echo "Healthy after ${i}s"
377+ healthy=true
378+ break
379+ fi
380+ done
381+
382+ kill $FLAPI_PID 2>/dev/null; wait $FLAPI_PID 2>/dev/null || true
383+
384+ if [ "$healthy" != "true" ]; then
385+ echo "=== server logs ===" && cat server.log
386+ exit 1
387+ fi
388+
389+ smoke-test-linux-arm64 :
390+ needs : [linux-build]
391+ runs-on : ubuntu-24.04-arm
392+ steps :
393+ - name : Download binary
394+ uses : actions/download-artifact@v4
395+ with :
396+ name : flapi-linux-arm64
397+ path : smoke
398+
399+ - name : Start server and health-check
400+ env :
401+ SMOKE_CONFIG : |
402+ project-name: smoke-test
403+ project-description: CI smoke test
404+ template:
405+ path: ./sqls
406+ duckdb:
407+ db-path: ./smoke-test.duckdb
408+ access-mode: READ_WRITE
409+ threads: 1
410+ max-memory: 256MB
411+ server:
412+ port: 18080
413+ run : |
414+ cd smoke
415+ chmod +x flapi
416+ mkdir -p sqls
417+ printf '%s' "$SMOKE_CONFIG" > smoke-config.yaml
418+
419+ DATAZOO_DISABLE_TELEMETRY=1 ./flapi -c smoke-config.yaml --config-service \
420+ > server.log 2>&1 &
421+ FLAPI_PID=$!
422+
423+ healthy=false
424+ for i in $(seq 1 30); do
425+ sleep 1
426+ if curl -sf --max-time 3 http://localhost:18080/api/v1/_config/health > /dev/null; then
427+ echo "Healthy after ${i}s"
428+ healthy=true
429+ break
430+ fi
431+ done
432+
433+ kill $FLAPI_PID 2>/dev/null; wait $FLAPI_PID 2>/dev/null || true
434+
435+ if [ "$healthy" != "true" ]; then
436+ echo "=== server logs ===" && cat server.log
437+ exit 1
438+ fi
439+
440+ smoke-test-macos :
441+ needs : [osx-universal-build]
442+ runs-on : macos-latest
443+ steps :
444+ - name : Download binary
445+ uses : actions/download-artifact@v4
446+ with :
447+ name : flapi-macos-arm64
448+ path : smoke
449+
450+ - name : Start server and health-check
451+ env :
452+ SMOKE_CONFIG : |
453+ project-name: smoke-test
454+ project-description: CI smoke test
455+ template:
456+ path: ./sqls
457+ duckdb:
458+ db-path: ./smoke-test.duckdb
459+ access-mode: READ_WRITE
460+ threads: 1
461+ max-memory: 256MB
462+ server:
463+ port: 18080
464+ run : |
465+ cd smoke
466+ chmod +x flapi
467+ mkdir -p sqls
468+ printf '%s' "$SMOKE_CONFIG" > smoke-config.yaml
469+
470+ DATAZOO_DISABLE_TELEMETRY=1 ./flapi -c smoke-config.yaml --config-service \
471+ > server.log 2>&1 &
472+ FLAPI_PID=$!
473+
474+ healthy=false
475+ for i in $(seq 1 30); do
476+ sleep 1
477+ if curl -sf --max-time 3 http://localhost:18080/api/v1/_config/health > /dev/null; then
478+ echo "Healthy after ${i}s"
479+ healthy=true
480+ break
481+ fi
482+ done
483+
484+ kill $FLAPI_PID 2>/dev/null; wait $FLAPI_PID 2>/dev/null || true
485+
486+ if [ "$healthy" != "true" ]; then
487+ echo "=== server logs ===" && cat server.log
488+ exit 1
489+ fi
490+
491+ smoke-test-windows :
492+ needs : [windows-build]
493+ runs-on : windows-latest
494+ steps :
495+ - name : Download binary
496+ uses : actions/download-artifact@v4
497+ with :
498+ name : flapi-windows-amd64
499+ path : smoke
500+
501+ - name : Start server and health-check
502+ env :
503+ SMOKE_CONFIG : |
504+ project-name: smoke-test
505+ project-description: CI smoke test
506+ template:
507+ path: ./sqls
508+ duckdb:
509+ db-path: ./smoke-test.duckdb
510+ access-mode: READ_WRITE
511+ threads: 1
512+ max-memory: 256MB
513+ server:
514+ port: 18080
515+ shell : pwsh
516+ run : |
517+ New-Item -ItemType Directory -Force smoke\sqls | Out-Null
518+ $env:SMOKE_CONFIG | Out-File -FilePath smoke\smoke-config.yaml -Encoding UTF8
519+
520+ $env:DATAZOO_DISABLE_TELEMETRY = "1"
521+ $p = Start-Process `
522+ -FilePath "smoke\flapi.exe" `
523+ -ArgumentList @("-c", "smoke-config.yaml", "--config-service") `
524+ -WorkingDirectory smoke `
525+ -RedirectStandardOutput smoke\stdout.log `
526+ -RedirectStandardError smoke\stderr.log `
527+ -PassThru
528+ Write-Host "flapi.exe PID: $($p.Id)"
529+
530+ $healthy = $false
531+ for ($i = 1; $i -le 30; $i++) {
532+ Start-Sleep -Seconds 1
533+ try {
534+ $r = Invoke-WebRequest -Uri "http://localhost:18080/api/v1/_config/health" `
535+ -UseBasicParsing -TimeoutSec 3 -ErrorAction Stop
536+ if ($r.StatusCode -eq 200) {
537+ Write-Host "Healthy after ${i}s"
538+ $healthy = $true
539+ break
540+ }
541+ } catch {}
542+ }
543+
544+ Stop-Process -Id $p.Id -Force -ErrorAction SilentlyContinue
545+ if (-not $healthy) {
546+ Write-Host "=== stdout ===" ; Get-Content smoke\stdout.log -ErrorAction SilentlyContinue
547+ Write-Host "=== stderr ===" ; Get-Content smoke\stderr.log -ErrorAction SilentlyContinue
548+ exit 1
549+ }
550+
335551 # -------------------------------------------------------------------------------------------------
336552 # Create GitHub Release + PyPI Wheels (tag pushes only)
337553 # -------------------------------------------------------------------------------------------------
338554 create-release :
339555 if : startsWith(github.ref, 'refs/tags/v')
340- needs : [windows-build, linux-build, osx-universal-build, flapii-build]
556+ needs : [windows-build, linux-build, osx-universal-build, flapii-build, smoke-test-windows, smoke-test-linux-amd64, smoke-test-linux-arm64, smoke-test-macos ]
341557 runs-on : ubuntu-24.04
342558 permissions :
343559 contents : write
0 commit comments