mirror of
https://github.com/katanemo/plano.git
synced 2026-04-25 08:46:24 +02:00
add native mode smoke test to CI
This commit is contained in:
parent
53d11ae235
commit
baab4e793c
2 changed files with 65 additions and 0 deletions
54
.github/workflows/ci.yml
vendored
54
.github/workflows/ci.yml
vendored
|
|
@ -53,6 +53,60 @@ jobs:
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: uv run pytest
|
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
|
# Single Docker build — shared by all downstream jobs
|
||||||
# ──────────────────────────────────────────────
|
# ──────────────────────────────────────────────
|
||||||
|
|
|
||||||
11
tests/e2e/config_native_smoke.yaml
Normal file
11
tests/e2e/config_native_smoke.yaml
Normal file
|
|
@ -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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue