Skip to content

feat: update topology test to use v2.0 images #105

feat: update topology test to use v2.0 images

feat: update topology test to use v2.0 images #105

# Copyright AGNTCY Contributors (https://github.com/agntcy)
# SPDX-License-Identifier: Apache-2.0
name: test-a2a-slimrpc
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
detect:
runs-on: ubuntu-latest
outputs:
should-run: ${{ steps.detect-suite.outputs.should-run }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- id: detect-suite
uses: ./.github/actions/detect-suite-changes
with:
suite: a2a-slimrpc
run-tests-a2a-slimrpc:
# A2A over SLIMRPC (Go + Python + .NET + Java). Starts a pinned Slim data-plane container per matrix row.
needs: detect
if: ${{ github.event_name == 'workflow_dispatch' || needs.detect.outputs.should-run == 'true' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Each row boots its OWN slim container (slim-image). The 1.4 languages
# (go/python/dotnet/java) pin ghcr.io/agntcy/slim:1.4.0; node-node pins the 2.0
# image matching @agntcy/slim-a2a's slim-bindings. The 8 node↔{1.4-lang} cross rows
# self-skip (wire skew) before connecting, so their image is irrelevant — kept on 1.4.0.
include:
- id: go-go
display-name: Go→Go
task: integrations:a2a-slimrpc:test:go-go
artifact-name: a2a-slimrpc-test-result-go-go
slim-image: ghcr.io/agntcy/slim:1.4.0
- id: go-python
display-name: Go→Python
task: integrations:a2a-slimrpc:test:go-python
artifact-name: a2a-slimrpc-test-result-go-python
slim-image: ghcr.io/agntcy/slim:1.4.0
- id: go-dotnet
display-name: Go→.NET
task: integrations:a2a-slimrpc:test:go-dotnet
artifact-name: a2a-slimrpc-test-result-go-dotnet
slim-image: ghcr.io/agntcy/slim:1.4.0
- id: python-go
display-name: Python→Go
task: integrations:a2a-slimrpc:test:python-go
artifact-name: a2a-slimrpc-test-result-python-go
slim-image: ghcr.io/agntcy/slim:1.4.0
- id: python-python
display-name: Python→Python
task: integrations:a2a-slimrpc:test:python-python
artifact-name: a2a-slimrpc-test-result-python-python
slim-image: ghcr.io/agntcy/slim:1.4.0
- id: python-dotnet
display-name: Python→.NET
task: integrations:a2a-slimrpc:test:python-dotnet
artifact-name: a2a-slimrpc-test-result-python-dotnet
slim-image: ghcr.io/agntcy/slim:1.4.0
- id: dotnet-go
display-name: .NET→Go
task: integrations:a2a-slimrpc:test:dotnet-go
artifact-name: a2a-slimrpc-test-result-dotnet-go
slim-image: ghcr.io/agntcy/slim:1.4.0
- id: dotnet-python
display-name: .NET→Python
task: integrations:a2a-slimrpc:test:dotnet-python
artifact-name: a2a-slimrpc-test-result-dotnet-python
slim-image: ghcr.io/agntcy/slim:1.4.0
- id: dotnet-dotnet
display-name: .NET→.NET
task: integrations:a2a-slimrpc:test:dotnet-dotnet
artifact-name: a2a-slimrpc-test-result-dotnet-dotnet
slim-image: ghcr.io/agntcy/slim:1.4.0
- id: go-java
display-name: Go→Java
task: integrations:a2a-slimrpc:test:go-java
artifact-name: a2a-slimrpc-test-result-go-java
slim-image: ghcr.io/agntcy/slim:1.4.0
- id: python-java
display-name: Python→Java
task: integrations:a2a-slimrpc:test:python-java
artifact-name: a2a-slimrpc-test-result-python-java
slim-image: ghcr.io/agntcy/slim:1.4.0
- id: dotnet-java
display-name: .NET→Java
task: integrations:a2a-slimrpc:test:dotnet-java
artifact-name: a2a-slimrpc-test-result-dotnet-java
slim-image: ghcr.io/agntcy/slim:1.4.0
- id: java-go
display-name: Java→Go
task: integrations:a2a-slimrpc:test:java-go
artifact-name: a2a-slimrpc-test-result-java-go
slim-image: ghcr.io/agntcy/slim:1.4.0
- id: java-python
display-name: Java→Python
task: integrations:a2a-slimrpc:test:java-python
artifact-name: a2a-slimrpc-test-result-java-python
slim-image: ghcr.io/agntcy/slim:1.4.0
- id: java-dotnet
display-name: Java→.NET
task: integrations:a2a-slimrpc:test:java-dotnet
artifact-name: a2a-slimrpc-test-result-java-dotnet
slim-image: ghcr.io/agntcy/slim:1.4.0
- id: java-java
display-name: Java→Java
task: integrations:a2a-slimrpc:test:java-java
artifact-name: a2a-slimrpc-test-result-java-java
slim-image: ghcr.io/agntcy/slim:1.4.0
# ---- Node rows: node-node runs against a slim 2.0 node; the 8 cross rows self-skip.
- id: node-node
display-name: Node→Node
task: integrations:a2a-slimrpc:test:node-node
artifact-name: a2a-slimrpc-test-result-node-node
slim-image: ghcr.io/agntcy/slim:2.0.0-alpha.3
- id: go-node
display-name: Go→Node
task: integrations:a2a-slimrpc:test:go-node
artifact-name: a2a-slimrpc-test-result-go-node
slim-image: ghcr.io/agntcy/slim:1.4.0
- id: python-node
display-name: Python→Node
task: integrations:a2a-slimrpc:test:python-node
artifact-name: a2a-slimrpc-test-result-python-node
slim-image: ghcr.io/agntcy/slim:1.4.0
- id: dotnet-node
display-name: .NET→Node
task: integrations:a2a-slimrpc:test:dotnet-node
artifact-name: a2a-slimrpc-test-result-dotnet-node
slim-image: ghcr.io/agntcy/slim:1.4.0
- id: java-node
display-name: Java→Node
task: integrations:a2a-slimrpc:test:java-node
artifact-name: a2a-slimrpc-test-result-java-node
slim-image: ghcr.io/agntcy/slim:1.4.0
- id: node-go
display-name: Node→Go
task: integrations:a2a-slimrpc:test:node-go
artifact-name: a2a-slimrpc-test-result-node-go
slim-image: ghcr.io/agntcy/slim:1.4.0
- id: node-python
display-name: Node→Python
task: integrations:a2a-slimrpc:test:node-python
artifact-name: a2a-slimrpc-test-result-node-python
slim-image: ghcr.io/agntcy/slim:1.4.0
- id: node-dotnet
display-name: Node→.NET
task: integrations:a2a-slimrpc:test:node-dotnet
artifact-name: a2a-slimrpc-test-result-node-dotnet
slim-image: ghcr.io/agntcy/slim:1.4.0
- id: node-java
display-name: Node→Java
task: integrations:a2a-slimrpc:test:node-java
artifact-name: a2a-slimrpc-test-result-node-java
slim-image: ghcr.io/agntcy/slim:1.4.0
name: A2A SLIMRPC ${{ matrix.display-name }}
permissions:
contents: read
packages: read
env:
# The slim node image is per-row (matrix.slim-image): 1.4.0 for the 1.4 languages,
# 2.0.0-alpha.3 for node-node. Keep both in sync with integrations/agntcy-a2a-slimrpc/Taskfile.yml
# (SLIM_IMAGE / SLIM_NODE_IMAGE).
SLIM_SERVER: "http://127.0.0.1:46357"
SLIM_SHARED_SECRET: "my_shared_secret_for_testing_purposes_only"
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Start pinned SLIM node
run: |
docker run -d --name slim-node \
-p 46357:46357 \
-v "${{ github.workspace }}/integrations/agntcy-a2a-slimrpc/ci/slim-server-config.yaml:/config.yaml:ro" \
"${{ matrix.slim-image }}" /slim --config /config.yaml
- name: Wait for SLIM node to accept connections
run: |
for i in $(seq 1 30); do
if timeout 1 bash -c '</dev/tcp/127.0.0.1/46357' >/dev/null 2>&1; then
echo "SLIM node is accepting connections on :46357"
exit 0
fi
sleep 1
done
echo "SLIM node did not open :46357 in time"
docker logs slim-node || true
exit 1
- name: Setup Environment
uses: ./.github/actions/setup-env
with:
python: true
go: true
go-version: "1.25.2"
dotnet: true
dotnet-version: "8.0.x"
java: true
java-version: "21"
node: true
node-version: "20"
- name: Run A2A SLIMRPC ${{ matrix.display-name }} interoperability tests
id: run-tests
run: task ${{ matrix.task }}
shell: bash
continue-on-error: true
- name: Generate test summary
if: always()
shell: bash
run: |
echo "### A2A SLIMRPC ${{ matrix.display-name }}" >> "$GITHUB_STEP_SUMMARY"
echo "" >> "$GITHUB_STEP_SUMMARY"
reports_dir="./integrations/agntcy-a2a-slimrpc/reports"
if [[ -d "$reports_dir" ]]; then
mapfile -t xmls < <(find "$reports_dir" -name "*.xml" 2>/dev/null | sort)
if [[ ${#xmls[@]} -gt 0 ]]; then
echo "| Report | Passed | Failed | Errors | Skipped | Time |" >> "$GITHUB_STEP_SUMMARY"
echo "|--------|--------|--------|--------|---------|------|" >> "$GITHUB_STEP_SUMMARY"
for xml in "${xmls[@]}"; do
name=$(basename "$xml" .xml)
tests=$(grep -oP 'tests="\K[0-9]+' "$xml" | head -1 || echo "0")
failures=$(grep -oP 'failures="\K[0-9]+' "$xml" | head -1 || echo "0")
errors=$(grep -oP 'errors="\K[0-9]+' "$xml" | head -1 || echo "0")
skipped=$(grep -c '<skipped' "$xml" || echo "0")
time=$(grep -oP 'time="\K[0-9.]+' "$xml" | head -1 || echo "0")
passed=$((tests - failures - errors - skipped))
echo "| $name | $passed | $failures | $errors | $skipped | ${time}s |" >> "$GITHUB_STEP_SUMMARY"
done
else
echo "No JUnit XML reports found." >> "$GITHUB_STEP_SUMMARY"
fi
else
echo "No reports directory found." >> "$GITHUB_STEP_SUMMARY"
fi
echo "" >> "$GITHUB_STEP_SUMMARY"
- name: SLIM node logs
if: always()
run: docker logs slim-node || true
- name: Stop SLIM node
if: always()
run: docker rm -f slim-node || true
- name: Propagate test result
if: ${{ steps.run-tests.outcome == 'failure' }}
shell: bash
run: exit 1
- name: Create artifact from integrations test reports
uses: ./.github/actions/create-artifact
with:
artifact-name: ${{ matrix.artifact-name }}
path-to-archive: integrations/agntcy-a2a-slimrpc/reports/
publish-pages:
needs: [run-tests-a2a-slimrpc]
if: always() && github.ref == 'refs/heads/main' && needs.run-tests-a2a-slimrpc.result != 'skipped'
runs-on: ubuntu-latest
concurrency:
group: test-report-pages
cancel-in-progress: false
permissions:
contents: write
actions: read
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/publish-test-reports-pages
with:
suite: a2a-slimrpc
source-run-id: ${{ github.run_id }}