Add Edge Gateway tests for unit, API, and integration scenarios

This commit is contained in:
Jeppe Bundgaard
2026-04-23 15:48:51 +02:00
parent c38a4379bd
commit b9ddc585db
23 changed files with 3579 additions and 117 deletions
+46
View File
@@ -120,6 +120,52 @@ jobs:
working-directory: services/edge-broker
run: npm test
edge-gateway-backend:
name: Edge Gateway Backend (required)
runs-on: [self-hosted, Linux, X64, default]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Materialize compose env files
env:
COMPOSE_ENV: ${{ secrets.COMPOSE_ENV }}
COMPOSE_ENV_STAGING: ${{ secrets.COMPOSE_ENV_STAGING }}
run: |
set -euo pipefail
if [ -z "${COMPOSE_ENV}" ]; then
echo "Required GitHub secret COMPOSE_ENV is not configured." >&2
exit 1
fi
if [ -z "${COMPOSE_ENV_STAGING}" ]; then
echo "Required GitHub secret COMPOSE_ENV_STAGING is not configured." >&2
exit 1
fi
printf '%s\n' "$COMPOSE_ENV" > .env
printf '%s\n' "$COMPOSE_ENV_STAGING" > .env.staging
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Boot local stack
run: docker compose up -d traefik redis mysql-debug edge-broker php1 caddy
- name: Run edge gateway API tests
run: docker compose exec -T php1 sh -lc "cd /var/www/html && composer test:api:edge"
- name: Run edge gateway integration tests
run: docker compose exec -T php1 sh -lc "cd /var/www/html && composer test:integration:edge"
- name: Run edge gateway E2E smoke
run: node scripts/edge-gateway-e2e.mjs
- name: Tear down local stack
if: always()
run: docker compose down -v
integration:
name: Integration (advisory)
runs-on: [self-hosted, Linux, X64, default]