Adding tests for analytics-header-filter policy #202
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: Build mock-jwks image | |
| run: | | |
| cd tests/mock-servers/mock-jwks | |
| docker build -t ghcr.io/wso2/api-platform/mock-jwks:latest . | |
| - 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/it/logs Directory Contents ===" | |
| if [ -d gateway/it/logs ]; then | |
| if [ "$(ls -A gateway/it/logs)" ]; then | |
| for f in gateway/it/logs/*; do | |
| echo "" | |
| echo "--- Contents of $f ---" | |
| cat "$f" | |
| done | |
| else | |
| echo "No log files found in gateway/it/logs." | |
| fi | |
| else | |
| echo "Directory gateway/it/logs does not exist." | |
| fi |