Run tests with coverage #52
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: Gateway Integration Test | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - 'gateway/**' | |
| - '.github/workflows/gateway-integration-test.yml' | |
| jobs: | |
| integration-test: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.25' | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build coverage-instrumented images | |
| run: | | |
| cd gateway | |
| make build-coverage | |
| - name: Run integration tests | |
| run: | | |
| cd gateway | |
| make test-integration | |
| - name: Upload coverage report | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: coverage-report | |
| path: gateway/it/coverage/output | |
| retention-days: 7 | |
| - name: Upload test reports | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: test-reports | |
| path: gateway/it/reports/ | |
| retention-days: 7 | |
| - name: Debug on failure - Dump logs | |
| if: failure() | |
| run: | | |
| echo "=== Docker Containers ===" | |
| docker ps -a | |
| echo "" | |
| echo "=== Gateway Controller Logs ===" | |
| docker logs it-gateway-controller 2>&1 || true | |
| echo "" | |
| echo "=== Policy Engine Logs ===" | |
| docker logs it-policy-engine 2>&1 || true | |
| echo "" | |
| echo "=== Router Logs ===" | |
| docker logs it-router 2>&1 || true | |
| echo "" | |
| echo "=== Sample Backend Logs ===" | |
| docker logs it-sample-backend 2>&1 || true | |
| echo "" | |
| echo "=== MCP Server Logs ===" | |
| docker logs mcp-server-backend 2>&1 || true |