Training metrics #289
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: Integration Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '**/README.md' | |
| - '**/docs/**' | |
| - '**/.github/workflows/publish.yml' | |
| pull_request: | |
| paths-ignore: | |
| - '**/README.md' | |
| - '**/docs/**' | |
| - '**/.github/workflows/publish.yml' | |
| jobs: | |
| integration-tests: | |
| name: Run integration tests (Python ${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| services: | |
| spin: | |
| image: ghcr.io/always-further/deepfabric/tools-sdk:latest | |
| ports: | |
| - 3000:3000 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: [ '3.10', '3.11', '3.12' ] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v5 | |
| - name: Wait for Spin service | |
| run: | | |
| echo "Waiting for Spin service to be ready..." | |
| for i in {1..30}; do | |
| response=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:3000/vfs/execute -X POST \ | |
| -H "Content-Type: application/json" \ | |
| -d '{"session_id":"healthcheck","tool":"list_files","args":{"directory":"/"}}' 2>/dev/null || echo "000") | |
| if [ "$response" = "200" ]; then | |
| echo "Spin service is ready" | |
| exit 0 | |
| fi | |
| echo "Attempt $i: waiting... (HTTP $response)" | |
| sleep 2 | |
| done | |
| echo "Spin service failed to become ready" | |
| exit 1 | |
| - name: Set up Python | |
| uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: uv sync --all-extras | |
| - name: Run integration tests | |
| run: make test-integration | |
| env: | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} | |
| SPIN_ENDPOINT: http://localhost:3000 |