refact tests #123
Workflow file for this run
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: Test Emulators | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths-ignore: | |
| - '**/*.md' | |
| - '**/*.MD' | |
| pull_request: | |
| branches: [ main ] | |
| paths-ignore: | |
| - '**/*.md' | |
| - '**/*.MD' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }}-test-emulators | |
| cancel-in-progress: true | |
| jobs: | |
| unit-integration-e2e: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Install dependencies (uv sync --frozen) | |
| run: | | |
| uv sync --all-extras --frozen | |
| - name: Clean up any existing Docker volumes | |
| run: docker compose down -v || true | |
| - name: Pre-build selected images (incl. Postgres 18) | |
| run: bash scripts/prebuild-images.sh a2a-inspector firebase-emulator postgres | |
| - name: Start Docker Compose services | |
| run: bash scripts/start-services.sh --no-build | |
| - name: Wait for services to be ready | |
| run: bash scripts/wait-for-services.sh --default 90 --a2a 180 --postgres 150 | |
| - name: Run unit/integration tests (non-e2e) | |
| run: bash scripts/run-tests-fast.sh | |
| - name: Run e2e tests | |
| run: | | |
| set -o pipefail | |
| bash scripts/run-tests-e2e.sh | tee e2e.log | |
| - name: Summarize skipped e2e tests | |
| if: always() | |
| shell: bash | |
| run: | | |
| if [[ ! -f e2e.log ]]; then | |
| summary=$'### E2E Skipped Tests\nNo e2e.log found.' | |
| printf '%s\n' "$summary" | |
| if [[ -n "${GITHUB_STEP_SUMMARY:-}" ]]; then | |
| printf '%s\n' "$summary" >> "$GITHUB_STEP_SUMMARY" | |
| fi | |
| exit 0 | |
| fi | |
| tmp_summary="$(mktemp)" | |
| { | |
| echo "### E2E Skipped Tests" | |
| SKIPS=$(awk 'BEGIN{p=0} /^=+ short test summary info =+$/ {p=1; next} /^=+/ {if(p==1) p=0} p==1 {print}' e2e.log | grep '^SKIPPED' || true) | |
| if [[ -n "$SKIPS" ]]; then | |
| echo "$SKIPS" | sed 's/^/- /' | |
| else | |
| ALT=$(grep -E " SKIPPED \(" e2e.log || true) | |
| if [[ -n "$ALT" ]]; then | |
| echo "$ALT" | sed 's/^/- /' | |
| else | |
| echo "No skipped e2e tests." | |
| fi | |
| fi | |
| } | tee "$tmp_summary" | |
| if [[ -n "${GITHUB_STEP_SUMMARY:-}" ]]; then | |
| cat "$tmp_summary" >> "$GITHUB_STEP_SUMMARY" | |
| fi | |
| - name: Show Docker logs on failure | |
| if: failure() | |
| run: docker compose logs |