feat(sdk): Introduce phase-specific policy sub-interfaces(SDK core & ai) #83
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: SDK Integration Test | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - 'sdk/**' | |
| - '.github/workflows/sdk-integration-test.yml' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | |
| cancel-in-progress: true | |
| 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.7' | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Inject local SDK into gateway modules | |
| run: | | |
| cd gateway/gateway-runtime/policy-engine | |
| go mod edit -replace github.com/wso2/api-platform/sdk=../../../sdk | |
| cd ../../gateway-builder | |
| go mod edit -replace github.com/wso2/api-platform/sdk=../../sdk | |
| cd ../gateway-controller | |
| go mod edit -replace github.com/wso2/api-platform/sdk=../../sdk | |
| - name: Build coverage-instrumented images | |
| run: | | |
| cd gateway | |
| make build-coverage VERSION=test | |
| - name: Build mock server images | |
| run: | | |
| for mock in mock-jwks mock-azure-content-safety mock-aws-bedrock-guardrail mock-embedding-provider mock-analytics-collector; do | |
| echo "Building $mock..." | |
| docker build -t ghcr.io/wso2/api-platform/$mock:latest tests/mock-servers/$mock | |
| done | |
| - name: Build sample-service | |
| run: | | |
| cd samples/sample-service | |
| make build | |
| - name: Run gateway integration tests | |
| run: | | |
| cd gateway | |
| make test-integration | |
| - 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 |