Nightly Browser Integration #14
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: Nightly Browser Integration | |
| on: | |
| schedule: | |
| - cron: "30 2 * * *" | |
| workflow_dispatch: | |
| concurrency: | |
| group: nightly-browser-integration | |
| cancel-in-progress: true | |
| jobs: | |
| nightly-browser-integration: | |
| name: "Nightly Browser Full Integration/E2E" | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 120 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: | | |
| pkgs/gull/uv.lock | |
| pkgs/bay/uv.lock | |
| - name: Install Gull dependencies | |
| working-directory: pkgs/gull | |
| run: uv sync --frozen | |
| - name: Install Bay dependencies | |
| working-directory: pkgs/bay | |
| run: uv sync --frozen | |
| - name: Build local runtime images | |
| run: | | |
| docker build -t ship:latest pkgs/ship | |
| docker build -t gull:latest pkgs/gull | |
| - name: Prepare Bay nightly config | |
| run: | | |
| cat > /tmp/bay-nightly-config.yaml <<'CFG' | |
| server: | |
| host: "127.0.0.1" | |
| port: 8001 | |
| security: | |
| api_key: "e2e-test-api-key" | |
| allow_anonymous: false | |
| driver: | |
| type: docker | |
| docker: | |
| connect_mode: host_port | |
| host_address: "127.0.0.1" | |
| publish_ports: true | |
| profiles: | |
| - id: python-default | |
| image: ship:latest | |
| runtime_type: ship | |
| runtime_port: 8123 | |
| capabilities: [filesystem, shell, python] | |
| idle_timeout: 1800 | |
| - id: python-data | |
| image: ship:latest | |
| runtime_type: ship | |
| runtime_port: 8123 | |
| capabilities: [filesystem, shell, python] | |
| idle_timeout: 1800 | |
| - id: browser-python | |
| containers: | |
| - name: ship | |
| image: ship:latest | |
| runtime_type: ship | |
| runtime_port: 8123 | |
| capabilities: [python, shell, filesystem] | |
| primary_for: [filesystem, python, shell] | |
| - name: browser | |
| image: gull:latest | |
| runtime_type: gull | |
| runtime_port: 8115 | |
| capabilities: [browser] | |
| primary_for: [browser] | |
| idle_timeout: 1800 | |
| CFG | |
| - name: Start Bay API for nightly e2e | |
| working-directory: pkgs/bay | |
| run: | | |
| BAY_CONFIG_FILE=/tmp/bay-nightly-config.yaml \ | |
| uv run uvicorn app.main:create_app --factory --host 127.0.0.1 --port 8001 > /tmp/bay-nightly.log 2>&1 & | |
| echo $! > /tmp/bay-nightly.pid | |
| for i in $(seq 1 60); do | |
| if curl -sf http://127.0.0.1:8001/health >/dev/null; then | |
| exit 0 | |
| fi | |
| sleep 1 | |
| done | |
| echo "Bay failed to start within 60s" | |
| cat /tmp/bay-nightly.log || true | |
| exit 1 | |
| - name: Run Gull full integration suite | |
| working-directory: pkgs/gull | |
| run: uv run pytest tests/integration -v --tb=short | |
| - name: Run Bay full integration/e2e suite | |
| working-directory: pkgs/bay | |
| env: | |
| E2E_BAY_PORT: "8001" | |
| E2E_API_KEY: "e2e-test-api-key" | |
| run: uv run pytest tests/integration -v --tb=short | |
| - name: Dump Bay logs on failure | |
| if: failure() | |
| run: cat /tmp/bay-nightly.log || true | |
| - name: Stop Bay API | |
| if: always() | |
| run: | | |
| if [ -f /tmp/bay-nightly.pid ]; then | |
| kill $(cat /tmp/bay-nightly.pid) || true | |
| fi |