Skip to content

E2E Tests

E2E Tests #2

Workflow file for this run

name: E2E Tests
on:
pull_request:
schedule:
- cron: '0 3 * * *' # Nightly at 3 AM UTC
jobs:
tier1-mock:
name: "Tier 1: Mock-based E2E"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.24'
- run: go test -v -timeout=2m ./tests/external/tier1/...
tier2-docker-minimal:
name: "Tier 2: Docker E2E (local-disk + none)"
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
needs: tier1-mock
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Start sandbox-host container (minimal)
run: |
docker compose -f tests/external/docker/docker-compose.e2e.yaml --profile minimal \
up -d --build --wait
- name: Run Tier 2 tests against container
run: go test -v -tags=docker -timeout=5m ./tests/external/tier2/...
env:
SANDBOX_HOST_URL: "http://localhost:8080"
SANDBOX_AUTH_TOKEN: "e2e-test-token"
SANDBOX_STORAGE_BACKEND: "local-disk"
SANDBOX_CONTAINER_RUNTIME: "none"
- name: Stop containers
if: always()
run: |
docker compose -f tests/external/docker/docker-compose.e2e.yaml --profile minimal down -v
tier2-docker-full:
name: "Tier 2: Docker E2E (ZFS + gVisor)"
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
needs: tier2-docker-minimal
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Load ZFS kernel module
run: sudo modprobe zfs || echo "ZFS module not available; skipping"
- name: Run full Docker E2E
run: |
if lsmod | grep -q zfs; then
docker compose -f tests/external/docker/docker-compose.e2e.yaml --profile full \
up -d --build --wait
go test -v -tags=docker -timeout=5m ./tests/external/tier2/... || EXIT=$?
docker compose -f tests/external/docker/docker-compose.e2e.yaml --profile full down -v
exit ${EXIT:-0}
else
echo "::warning::ZFS kernel module not available. Skipping full Tier 2 tests."
echo "::notice::Minimal Tier 2 (local-disk + none) already passed."
fi
env:
SANDBOX_HOST_URL: "http://localhost:8080"
SANDBOX_AUTH_TOKEN: "e2e-test-token"
SANDBOX_STORAGE_BACKEND: "zfs"
SANDBOX_CONTAINER_RUNTIME: "gvisor"
tier3-nightly:
name: "Tier 3: Nightly Full E2E"
runs-on: [self-hosted, linux, zfs]
if: github.event_name == 'schedule'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Start full Docker compose stack
run: |
docker compose -f tests/external/docker/docker-compose.e2e.yaml --profile full \
up -d --build --wait
- name: Run native E2E
run: go test -v -tags=native -timeout=20m ./tests/external/tier3/...
env:
SANDBOX_HOST_URL: "http://localhost:8080"
SANDBOX_AUTH_TOKEN: "e2e-test-token"
SANDBOX_STORAGE_BACKEND: "zfs"
SANDBOX_CONTAINER_RUNTIME: "gvisor"
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
- name: Stop containers
if: always()
run: |
docker compose -f tests/external/docker/docker-compose.e2e.yaml --profile full down -v
- name: Upload test report
if: always()
uses: actions/upload-artifact@v4
with:
name: e2e-report
path: tests/external/reports/