From baab4e793cbb303601ca70a61d7968efc13632ce Mon Sep 17 00:00:00 2001 From: Adil Hafeez Date: Tue, 3 Mar 2026 15:15:57 -0800 Subject: [PATCH] add native mode smoke test to CI --- .github/workflows/ci.yml | 54 ++++++++++++++++++++++++++++++ tests/e2e/config_native_smoke.yaml | 11 ++++++ 2 files changed, 65 insertions(+) create mode 100644 tests/e2e/config_native_smoke.yaml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9bbca4e7..173d283b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,6 +53,60 @@ jobs: - name: Run tests run: uv run pytest + # ────────────────────────────────────────────── + # Native mode smoke test — build from source & start natively + # ────────────────────────────────────────────── + native-smoke-test: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v6 + + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: "3.12" + + - name: Install uv + run: curl -LsSf https://astral.sh/uv/install.sh | sh + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + targets: wasm32-wasip1 + + - name: Install planoai CLI + working-directory: ./cli + run: | + uv sync + uv tool install . + + - name: Build native binaries + run: planoai build + + - name: Start plano natively + env: + OPENAI_API_KEY: test-key-not-used + run: planoai up tests/e2e/config_native_smoke.yaml + + - name: Health check + run: | + for i in $(seq 1 30); do + if curl -sf http://localhost:12000/healthz > /dev/null 2>&1; then + echo "Health check passed" + exit 0 + fi + sleep 1 + done + echo "Health check failed after 30s" + cat ~/.plano/run/logs/envoy.log || true + cat ~/.plano/run/logs/brightstaff.log || true + exit 1 + + - name: Stop plano + if: always() + run: planoai down || true + # ────────────────────────────────────────────── # Single Docker build — shared by all downstream jobs # ────────────────────────────────────────────── diff --git a/tests/e2e/config_native_smoke.yaml b/tests/e2e/config_native_smoke.yaml new file mode 100644 index 00000000..ddb0134f --- /dev/null +++ b/tests/e2e/config_native_smoke.yaml @@ -0,0 +1,11 @@ +version: v0.3.0 + +listeners: + - type: model + name: model_listener + port: 12000 + +model_providers: + - model: openai/gpt-4o + access_key: $OPENAI_API_KEY + default: true