feat: add structured outputs with Outlines #63
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test Static Discovery | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test-hostfile: | |
| runs-on: mac2.metal | |
| timeout-minutes: 15 | |
| env: | |
| PROJECT_ROOT: ${{ github.workspace }} | |
| PYTHONPATH: src | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup Environment | |
| uses: ./.github/actions/setup-env | |
| with: | |
| python_version: '3.12' | |
| - name: Ensure compatible gRPC/protobuf versions | |
| run: | | |
| uv pip install --upgrade "grpcio>=1.75.1" "protobuf>=6.31.1" | |
| - name: Kill processes on required ports | |
| run: | | |
| for port in 8080 8081 58080 58081; do | |
| lsof -ti:$port | xargs kill -9 2>/dev/null || true | |
| done | |
| sleep 2 | |
| - name: Run unit tests | |
| run: uv run pytest tests/test_static_discovery.py -v | |
| - name: Start shard with explicit name | |
| uses: ./.github/actions/start-shard | |
| with: | |
| http_port: '8081' | |
| grpc_port: '58081' | |
| shard_name: 'ci-shard' | |
| - name: Create hostfile | |
| run: echo "ci-shard 127.0.0.1 8081 58081" > hostfile | |
| - name: Start API with hostfile | |
| uses: ./.github/actions/start-api | |
| with: | |
| http_port: '8080' | |
| grpc_port: '58080' | |
| hostfile: 'hostfile' | |
| - name: Verify static discovery | |
| run: | | |
| echo "Checking /v1/devices endpoint..." | |
| DEVICES=$(curl -s http://localhost:8080/v1/devices) | |
| echo "Response: $DEVICES" | |
| echo "$DEVICES" | grep -q "ci-shard" && echo "✓ Static discovery working - shard found via hostfile" | |
| - name: Cleanup | |
| if: always() | |
| uses: ./.github/actions/cleanup-servers | |
| - name: Show logs on failure | |
| if: failure() | |
| run: | | |
| echo "=== Shard logs ===" | |
| cat shard.log 2>/dev/null || echo "(no shard log)" | |
| echo "" | |
| echo "=== API logs ===" | |
| cat api.log 2>/dev/null || echo "(no API log)" |