|
| 1 | +name: A2A TCK Test |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + paths: |
| 6 | + - 'a2a/**' |
| 7 | + pull_request: |
| 8 | + paths: |
| 9 | + - 'a2a/**' |
| 10 | + workflow_dispatch: |
| 11 | + |
| 12 | +concurrency: |
| 13 | + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
| 14 | + cancel-in-progress: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }} |
| 15 | + |
| 16 | +env: |
| 17 | + JAVA_VERSION: 17 |
| 18 | + JAVA_DISTRIBUTION: 'corretto' |
| 19 | + |
| 20 | +jobs: |
| 21 | + a2a-tck-test: |
| 22 | + runs-on: ubuntu-latest |
| 23 | + timeout-minutes: 10 |
| 24 | + |
| 25 | + permissions: |
| 26 | + contents: read |
| 27 | + |
| 28 | + steps: |
| 29 | + - name: Configure Git |
| 30 | + run: | |
| 31 | + git config --global core.autocrlf input |
| 32 | +
|
| 33 | + - uses: actions/checkout@v5 |
| 34 | + |
| 35 | + - name: Set up JDK ${{ env.JAVA_VERSION }} |
| 36 | + uses: actions/setup-java@v5 |
| 37 | + with: |
| 38 | + java-version: ${{ env.JAVA_VERSION }} |
| 39 | + distribution: ${{ env.JAVA_DISTRIBUTION }} |
| 40 | + |
| 41 | + - name: Setup Gradle |
| 42 | + uses: gradle/actions/setup-gradle@v4 |
| 43 | + |
| 44 | + - name: Set up Python 3.12 |
| 45 | + uses: actions/setup-python@v6 |
| 46 | + with: |
| 47 | + python-version: '3.12' |
| 48 | + |
| 49 | + - name: Install uv |
| 50 | + uses: astral-sh/setup-uv@v6 |
| 51 | + with: |
| 52 | + version: "0.8.15" |
| 53 | + enable-cache: true |
| 54 | + |
| 55 | + - name: Setup A2A TCK |
| 56 | + working-directory: ./a2a/test-tck |
| 57 | + run: ./setup_tck.sh |
| 58 | + |
| 59 | + - name: Build test server |
| 60 | + run: ./gradlew :a2a:test-tck:a2a-test-server-tck:assemble |
| 61 | + |
| 62 | + - name: Start test server in background |
| 63 | + working-directory: ./a2a/test-tck |
| 64 | + run: | |
| 65 | + ./run_sut.sh > server.log 2>&1 & |
| 66 | + SERVER_PID=$! |
| 67 | + echo "SERVER_PID=$SERVER_PID" >> $GITHUB_ENV |
| 68 | +
|
| 69 | + # Wait for server to start (max 60 seconds) |
| 70 | + timeout 60 bash -c ' |
| 71 | + while ! grep -q "Responding at http://0.0.0.0:9999" server.log 2>/dev/null; do |
| 72 | + sleep 1 |
| 73 | + done |
| 74 | + ' |
| 75 | +
|
| 76 | + echo "Server started successfully" |
| 77 | +
|
| 78 | + - name: Run TCK tests - Mandatory |
| 79 | + working-directory: ./a2a/test-tck |
| 80 | + run: ./run_tck.sh --sut-url http://localhost:9999/a2a --category mandatory --report |
| 81 | + |
| 82 | + - name: Run TCK tests - Capabilities |
| 83 | + working-directory: ./a2a/test-tck |
| 84 | + run: ./run_tck.sh --sut-url http://localhost:9999/a2a --category capabilities --report |
| 85 | + |
| 86 | + - name: Run TCK tests - Transport Equivalence |
| 87 | + working-directory: ./a2a/test-tck |
| 88 | + run: ./run_tck.sh --sut-url http://localhost:9999/a2a --category transport-equivalence --report |
| 89 | + |
| 90 | + - name: Run TCK tests - Quality |
| 91 | + working-directory: ./a2a/test-tck |
| 92 | + run: ./run_tck.sh --sut-url http://localhost:9999/a2a --category quality --report |
| 93 | + |
| 94 | + - name: Run TCK tests - Features |
| 95 | + working-directory: ./a2a/test-tck |
| 96 | + run: ./run_tck.sh --sut-url http://localhost:9999/a2a --category features --report |
| 97 | + |
| 98 | + - name: Stop test server |
| 99 | + if: always() |
| 100 | + run: | |
| 101 | + if [ ! -z "$SERVER_PID" ]; then |
| 102 | + kill $SERVER_PID || true |
| 103 | + wait $SERVER_PID 2>/dev/null || true |
| 104 | + fi |
| 105 | +
|
| 106 | + - name: Upload TCK reports |
| 107 | + if: always() |
| 108 | + uses: actions/upload-artifact@v4 |
| 109 | + with: |
| 110 | + name: a2a-tck-reports |
| 111 | + path: a2a/test-tck/a2a-tck/reports/*.html |
| 112 | + if-no-files-found: warn |
0 commit comments