Nightly Validation #7
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 Validation | |
| on: | |
| schedule: | |
| - cron: '23 4 * * *' | |
| workflow_dispatch: | |
| concurrency: | |
| group: nightly-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| PYTHON_VERSION: "3.11" | |
| LOCAL_API_IMAGE_AMD64: code-interpreter:nightly-amd64 | |
| LOCAL_API_IMAGE_ARM64: code-interpreter:nightly-arm64 | |
| jobs: | |
| full-live-amd64: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 75 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| cache: pip | |
| - uses: docker/setup-buildx-action@v3 | |
| - name: Install test dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install pytest pytest-asyncio pytest-cov pytest-mock | |
| - name: Build nightly amd64 image | |
| run: | | |
| docker buildx build \ | |
| --load \ | |
| --target app \ | |
| --tag "${LOCAL_API_IMAGE_AMD64}" \ | |
| --cache-from "type=gha,scope=nightly-app-amd64" \ | |
| --cache-to "type=gha,scope=nightly-app-amd64,mode=max" \ | |
| . | |
| - name: Start nightly stack | |
| env: | |
| API_IMAGE: ${{ env.LOCAL_API_IMAGE_AMD64 }} | |
| run: | | |
| cp .env.example .env | |
| docker compose up -d | |
| - name: Wait for API | |
| run: | | |
| if ! scripts/ci/wait_for_api.sh http://localhost:8000/health 24 5; then | |
| docker compose logs --no-color api | |
| exit 1 | |
| fi | |
| - name: Run full live functional suite | |
| env: | |
| API_BASE: http://localhost:8000 | |
| API_KEY: your-secure-api-key-here-change-this-in-production | |
| run: | | |
| mkdir -p test-results | |
| pytest tests/functional/ -m live_api -v --junitxml=test-results/nightly-full-live-amd64.xml | |
| - name: Capture compose logs on failure | |
| if: failure() | |
| run: docker compose logs --no-color > nightly-full-amd64.log | |
| - name: Upload nightly full artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: nightly-full-live-amd64 | |
| path: | | |
| test-results/ | |
| nightly-full-amd64.log | |
| if-no-files-found: ignore | |
| - name: Stop nightly stack | |
| if: always() | |
| run: docker compose down -v | |
| slow-live-amd64: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 75 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| cache: pip | |
| - uses: docker/setup-buildx-action@v3 | |
| - name: Install test dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install pytest pytest-asyncio pytest-cov pytest-mock | |
| - name: Build nightly amd64 image | |
| run: | | |
| docker buildx build \ | |
| --load \ | |
| --target app \ | |
| --tag "${LOCAL_API_IMAGE_AMD64}" \ | |
| --cache-from "type=gha,scope=nightly-app-amd64" \ | |
| --cache-to "type=gha,scope=nightly-app-amd64,mode=max" \ | |
| . | |
| - name: Start nightly stack | |
| env: | |
| API_IMAGE: ${{ env.LOCAL_API_IMAGE_AMD64 }} | |
| run: | | |
| cp .env.example .env | |
| docker compose up -d | |
| - name: Wait for API | |
| run: | | |
| if ! scripts/ci/wait_for_api.sh http://localhost:8000/health 24 5; then | |
| docker compose logs --no-color api | |
| exit 1 | |
| fi | |
| - name: Run slow live suite | |
| env: | |
| API_BASE: http://localhost:8000 | |
| API_KEY: your-secure-api-key-here-change-this-in-production | |
| run: | | |
| mkdir -p test-results | |
| pytest tests/functional/ -m slow -v --junitxml=test-results/nightly-slow-live-amd64.xml | |
| - name: Capture compose logs on failure | |
| if: failure() | |
| run: docker compose logs --no-color > nightly-slow-amd64.log | |
| - name: Upload nightly slow artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: nightly-slow-live-amd64 | |
| path: | | |
| test-results/ | |
| nightly-slow-amd64.log | |
| if-no-files-found: ignore | |
| - name: Stop nightly stack | |
| if: always() | |
| run: docker compose down -v | |
| arm64-smoke: | |
| runs-on: ubuntu-24.04-arm | |
| timeout-minutes: 40 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| cache: pip | |
| - uses: docker/setup-buildx-action@v3 | |
| - name: Install test dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install pytest pytest-asyncio pytest-cov pytest-mock | |
| - name: Build nightly arm64 image | |
| run: | | |
| docker buildx build \ | |
| --load \ | |
| --target app \ | |
| --tag "${LOCAL_API_IMAGE_ARM64}" \ | |
| --cache-from "type=gha,scope=nightly-app-arm64" \ | |
| --cache-to "type=gha,scope=nightly-app-arm64,mode=max" \ | |
| . | |
| - name: Start nightly arm64 stack | |
| env: | |
| API_IMAGE: ${{ env.LOCAL_API_IMAGE_ARM64 }} | |
| run: | | |
| cp .env.example .env | |
| docker compose up -d | |
| - name: Wait for API | |
| run: | | |
| if ! scripts/ci/wait_for_api.sh http://localhost:8000/health 24 5; then | |
| docker compose logs --no-color api | |
| exit 1 | |
| fi | |
| - name: Run nightly arm64 smoke suite | |
| env: | |
| API_BASE: http://localhost:8000 | |
| API_KEY: your-secure-api-key-here-change-this-in-production | |
| run: | | |
| mkdir -p test-results | |
| pytest \ | |
| tests/functional/test_health.py \ | |
| tests/functional/test_exec_workflow.py::TestSessionWorkflow::test_execution_creates_session \ | |
| tests/functional/test_files.py::TestFileUpload::test_upload_single_file \ | |
| tests/functional/test_ptc.py::TestPTCInitialExecution::test_ptc_simple_code_completes \ | |
| -v \ | |
| --junitxml=test-results/nightly-arm64-smoke.xml | |
| - name: Capture compose logs on failure | |
| if: failure() | |
| run: docker compose logs --no-color > nightly-arm64.log | |
| - name: Upload nightly arm64 artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: nightly-arm64-smoke | |
| path: | | |
| test-results/ | |
| nightly-arm64.log | |
| if-no-files-found: ignore | |
| - name: Stop nightly arm64 stack | |
| if: always() | |
| run: docker compose down -v |