Skip to content

FEAT: PAAL-151 Add Testworkflows #28

FEAT: PAAL-151 Add Testworkflows

FEAT: PAAL-151 Add Testworkflows #28

name: Test Testworkflows
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
# Required environment variables for the test
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
jobs:
test-testworkflows:
runs-on: ubuntu-latest
defaults:
run:
working-directory: testworkflows
steps:
- name: Checkout
uses: 'actions/checkout@v5'
- name: Install uv
uses: 'astral-sh/setup-uv@v6'
with:
version: "0.8.17"
enable-cache: true
- name: Set up Python
uses: 'actions/setup-python@v6'
with:
python-version-file: "testworkflows/.python-version"
- name: Install Dependencies
run: uv sync --all-packages
- name: Set up Kubernetes (kind)
uses: 'helm/kind-action@v1'
with:
cluster_name: testbench-cluster
- name: Install Tilt
run: |
curl -fsSL https://raw.githubusercontent.com/tilt-dev/tilt/master/scripts/install.sh | bash
tilt version
- name: Start test data server
run: uv run python -m http.server 8000 --directory tests/test_data &
- name: Start Tiltfile services
run: tilt ci
working-directory: .
- name: Wait for services to be ready
run: |
echo "Waiting for services to be ready..."
kubectl wait --for=condition=ready pod -l app=weather-agent --timeout=300s || true
kubectl wait --for=condition=ready pod -l app=ai-gateway-litellm --timeout=300s || true
kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=lgtm --timeout=300s || true
echo "Checking service status..."
kubectl get pods -A
echo "Waiting for test-data-server (HTTP server on port 8000)..."
curl --retry 30 --retry-delay 2 --retry-connrefused -f http://localhost:8000/dataset.json > /dev/null
- name: Run pytest
run: uv run pytest tests/ -v