spaxel/.github/workflows/e2e.yml
jedarden 60a21bacb6 feat: add end-to-end integration test harness
Implements a comprehensive e2e test system that:
- Starts mothership container/binary
- Waits for /healthz with 15s timeout
- Handles PIN auth setup if needed
- Runs CSI simulator against mothership
- Asserts during run (health, nodes online, blob detection)
- Validates frame rate doesn't drop >20%
- Asserts detection events recorded

Components added:
- mothership/cmd/sim: CSI simulator that generates synthetic frames
- mothership/tests/e2e: Go test suite with WebSocket assertions
- tests/e2e/run.sh: Shell script with comprehensive assertions
- .github/workflows/e2e.yml: CI workflow for automated testing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 12:40:25 -04:00

75 lines
1.7 KiB
YAML

name: E2E Tests
on:
push:
branches: [main]
paths:
- 'mothership/**'
- 'tests/**'
- '.github/workflows/e2e.yml'
pull_request:
branches: [main]
paths:
- 'mothership/**'
- 'tests/**'
- '.github/workflows/e2e.yml'
workflow_dispatch:
jobs:
e2e:
name: End-to-End Integration Tests
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.25'
cache-dependency-path: mothership/go.sum
- name: Build mothership
working-directory: mothership
run: go build -v ./cmd/mothership
- name: Build simulator
working-directory: mothership
run: go build -v -o /tmp/spaxel-sim ./cmd/sim
- name: Run e2e tests
working-directory: mothership
run: go test -v -timeout 90s ./tests/e2e/...
docker-e2e:
name: Docker E2E Tests
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.25'
cache-dependency-path: mothership/go.sum
- name: Build Docker image
run: |
docker build -t spaxel-e2e:test .
- name: Build simulator
working-directory: mothership
run: go build -v -o /tmp/spaxel-sim ./cmd/sim
- name: Run shell-based e2e test with Docker
env:
MOTHERSHIP_IMAGE: spaxel-e2e:test
run: |
chmod +x tests/e2e/run.sh
cd mothership
../tests/e2e/run.sh