Skip to content

Commit 2eea6cd

Browse files
jmesnilclaude
andcommitted
ci: update TCK workflow to use a2a-tck 1.0-dev branch with codegen SUT
Switch the TCK CI workflow to pull from the 1.0-dev branch of a2a-tck and use its codegen to generate and run the a2a-java SUT, instead of the local tck/ module. Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent c12888d commit 2eea6cd

1 file changed

Lines changed: 28 additions & 90 deletions

File tree

.github/workflows/run-tck.yml

Lines changed: 28 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,8 @@ on:
1212

1313
env:
1414
# Tag/branch of the TCK
15-
TCK_VERSION: main
16-
# Tell the TCK runner to report failure if the quality tests fail
17-
A2A_TCK_FAIL_ON_QUALITY: 1
18-
# Tell the TCK runner to report failure if the features tests fail
19-
A2A_TCK_FAIL_ON_FEATURES: 1
20-
# Tells uv to not need a venv, and instead use system
21-
UV_SYSTEM_PYTHON: 1
22-
# SUT_JSONRPC_URL to use for the TCK and the server agent
23-
SUT_JSONRPC_URL: http://localhost:9999
24-
# Slow system on CI
25-
TCK_STREAMING_TIMEOUT: 5.0
15+
TCK_VERSION: 1.0-dev
16+
SUT_URL: http://localhost:9999
2617

2718
# Only run the latest job
2819
concurrency:
@@ -42,134 +33,81 @@ jobs:
4233
uses: actions/checkout@v6
4334
with:
4435
repository: a2aproject/a2a-tck
45-
path: tck/a2a-tck
36+
path: a2a-tck
4637
ref: ${{ env.TCK_VERSION }}
4738
- name: Set up JDK ${{ matrix.java-version }}
4839
uses: actions/setup-java@v5
4940
with:
5041
java-version: ${{ matrix.java-version }}
5142
distribution: 'temurin'
5243
cache: maven
53-
- name: check java_home
54-
run: echo $JAVA_HOME
5544
- name: Set up Python
5645
uses: actions/setup-python@v5
5746
with:
58-
python-version-file: "tck/a2a-tck/pyproject.toml"
47+
python-version-file: "a2a-tck/pyproject.toml"
5948
- name: Install uv and Python dependencies
6049
run: |
6150
pip install uv
6251
uv pip install -e .
63-
working-directory: tck/a2a-tck
64-
- name: Build with Maven, skipping tests
52+
working-directory: a2a-tck
53+
- name: Build a2a-java SDK
6554
run: mvn -B install -DskipTests
55+
- name: Extract a2a-java version
56+
id: extract-version
57+
run: |
58+
A2A_JAVA_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
59+
echo "version=$A2A_JAVA_VERSION" >> $GITHUB_OUTPUT
60+
echo "Detected a2a-java version: $A2A_JAVA_VERSION"
61+
- name: Generate a2a-java SUT
62+
run: A2A_JAVA_SDK_VERSION=${{ steps.extract-version.outputs.version }} make codegen-a2a-java-sut
63+
working-directory: a2a-tck
6664
- name: Start SUT
67-
run: SUT_GRPC_URL=${{ env.SUT_JSONRPC_URL }} SUT_REST_URL=${{ env.SUT_JSONRPC_URL }} mvn -B quarkus:dev & #SUT_JSONRPC_URL already set
68-
working-directory: tck
65+
run: mvn -B quarkus:dev -Dquarkus.console.enabled=false &
66+
working-directory: a2a-tck/sut/a2a-java
6967
- name: Wait for SUT to start
7068
run: |
71-
URL="${{ env.SUT_JSONRPC_URL }}/.well-known/agent-card.json"
69+
URL="${{ env.SUT_URL }}/.well-known/agent-card.json"
7270
EXPECTED_STATUS=200
7371
TIMEOUT=120
7472
RETRY_INTERVAL=2
7573
START_TIME=$(date +%s)
7674
7775
while true; do
78-
# Calculate elapsed time
7976
CURRENT_TIME=$(date +%s)
8077
ELAPSED_TIME=$((CURRENT_TIME - START_TIME))
8178
82-
# Check for timeout
8379
if [ "$ELAPSED_TIME" -ge "$TIMEOUT" ]; then
84-
echo "Timeout: Server did not respond with status $EXPECTED_STATUS within $TIMEOUT seconds."
80+
echo "Timeout: Server did not respond with status $EXPECTED_STATUS within $TIMEOUT seconds."
8581
exit 1
8682
fi
8783
88-
# Get HTTP status code. || true is to reporting a failure to connect as an error
8984
HTTP_STATUS=$(curl --output /dev/null --silent --write-out "%{http_code}" "$URL") || true
90-
echo "STATUS: ${HTTP_STATUS}"
9185
92-
# Check if we got the correct status code
9386
if [ "$HTTP_STATUS" -eq "$EXPECTED_STATUS" ]; then
94-
echo "Server is up! Received status $HTTP_STATUS after $ELAPSED_TIME seconds."
87+
echo "Server is up! Received status $HTTP_STATUS after $ELAPSED_TIME seconds."
9588
break;
9689
fi
9790
98-
# Wait before retrying
99-
echo "⏳ Server not ready (status: $HTTP_STATUS). Retrying in $RETRY_INTERVAL seconds..."
91+
echo "Server not ready (status: $HTTP_STATUS). Retrying in $RETRY_INTERVAL seconds..."
10092
sleep "$RETRY_INTERVAL"
10193
done
102-
10394
- name: Run TCK
10495
id: run-tck
10596
timeout-minutes: 5
10697
run: |
10798
set -o pipefail
108-
./run_tck.py --sut-url ${{ env.SUT_JSONRPC_URL }} --category all --transports jsonrpc,grpc,rest --compliance-report report.json 2>&1 | tee tck-output.log
109-
working-directory: tck/a2a-tck
110-
- name: Capture Diagnostics on Failure
111-
if: failure()
112-
run: |
113-
echo "=== Capturing diagnostic information ==="
114-
115-
# Create diagnostics directory
116-
mkdir -p tck/target/diagnostics
117-
118-
# Capture process list
119-
echo "📋 Capturing process list..."
120-
ps auxww > tck/target/diagnostics/processes.txt
121-
122-
# Find the actual Quarkus JVM (child of Maven process), not the Maven parent
123-
# Look for the dev.jar process which is the actual application
124-
QUARKUS_PID=$(pgrep -f "a2a-tck-server-dev.jar" || echo "")
125-
if [ -n "$QUARKUS_PID" ]; then
126-
echo "📊 Capturing thread dump for Quarkus JVM PID $QUARKUS_PID"
127-
jstack $QUARKUS_PID > tck/target/diagnostics/thread-dump.txt || echo "Failed to capture thread dump"
128-
if [ -f tck/target/diagnostics/thread-dump.txt ]; then
129-
echo "✅ Thread dump captured ($(wc -l < tck/target/diagnostics/thread-dump.txt) lines)"
130-
fi
131-
else
132-
echo "⚠️ No Quarkus JVM process found for thread dump"
133-
echo "Available Java processes:"
134-
ps aux | grep java | tee -a tck/target/diagnostics/processes.txt || true
135-
fi
136-
137-
# Capture Quarkus application logs (if available)
138-
echo "📝 Checking for Quarkus logs..."
139-
if [ -f tck/target/quarkus.log ]; then
140-
cp tck/target/quarkus.log tck/target/diagnostics/
141-
echo "✅ Copied quarkus.log ($(wc -l < tck/target/quarkus.log) lines)"
142-
fi
143-
144-
# Copy TCK server logs
145-
if [ -f tck/target/tck-test.log ]; then
146-
cp tck/target/tck-test.log tck/target/diagnostics/
147-
echo "✅ Copied tck-test.log ($(wc -l < tck/target/tck-test.log) lines)"
148-
fi
149-
150-
echo ""
151-
echo "=== Diagnostic capture complete ==="
152-
- name: Stop Quarkus Server
99+
uv run ./run_tck.py --sut-host ${{ env.SUT_URL }} -v 2>&1 | tee tck-output.log
100+
working-directory: a2a-tck
101+
- name: Stop SUT
153102
if: always()
154103
run: |
155-
# Find and kill the Quarkus process to ensure logs are flushed
156104
pkill -f "quarkus:dev" || true
157105
sleep 2
158-
- name: Upload TCK Diagnostics
159-
if: failure()
160-
uses: actions/upload-artifact@v6
161-
with:
162-
name: tck-diagnostics-java-${{ matrix.java-version }}
163-
path: |
164-
tck/target/diagnostics/
165-
tck/a2a-tck/tck-output.log
166-
retention-days: 7
167-
if-no-files-found: warn
168-
- name: Upload TCK Compliance Report
106+
- name: Upload TCK Reports
169107
if: always()
170108
uses: actions/upload-artifact@v6
171109
with:
172-
name: tck-compliance-report-java-${{ matrix.java-version }}
173-
path: tck/a2a-tck/report.json
110+
name: tck-reports-java-${{ matrix.java-version }}
111+
path: a2a-tck/reports/
174112
retention-days: 14
175-
if-no-files-found: ignore
113+
if-no-files-found: warn

0 commit comments

Comments
 (0)