bria 0.1.0

Multi-pipeline job orchestrator
Documentation
name: E2E

on:
  push:
    branches: [main]
  workflow_dispatch:

permissions: read-all

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  e2e:
    name: E2E (Docker Compose)
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - uses: actions/checkout@v6

      - name: Install host dependencies
        run: sudo apt-get update -qq && sudo apt-get install -y -qq sqlite3

      - name: Build bria image
        run: docker build -t bria:e2e .

      - name: Start shared infra
        working-directory: tests/e2e
        run: ./run.sh --infra-up

      # ── Happy-path and recovery scenarios ──
      - name: Run e2e (happy-path)
        working-directory: tests/e2e
        run: |
          scenarios=(
            http-pg
            file-file
            file-sqlite
            http-file
            http-sqlite
            http-sse
            webhook-pg
            cron-file
            pg-pg
            sqlite-file
            queue-file
            http-queue
            http-webhook
            http-pg-recovery
          )
          failed=0
          for s in "${scenarios[@]}"; do
            echo "::group::$s"
            if ./run.sh "$s"; then
              echo "  PASS"
            else
              echo "  FAIL"
              failed=1
            fi
            echo "::endgroup::"
          done
          exit $failed

      # ── Failure and edge-case scenarios ──
      - name: Run e2e (failure/recovery)
        working-directory: tests/e2e
        run: |
          scenarios=(
            http-nonzero
            http-413
            http-cancel
            http-condition-false
            webhook-hmac-401
          )
          failed=0
          for s in "${scenarios[@]}"; do
            echo "::group::$s"
            if ./run.sh "$s"; then
              echo "  PASS"
            else
              echo "  FAIL"
              failed=1
            fi
            echo "::endgroup::"
          done
          exit $failed

      - name: Tear down shared infra
        if: always()
        working-directory: tests/e2e
        run: ./run.sh --infra-down