Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
b60cee0
FEAT: PAAL-152 Dockerimage for Testworkflow
Oct 30, 2025
088aca1
FEAT: PAAL-151 Add Testworkflows
Oct 30, 2025
143766a
FEAT: Add unit tests & test datasets
Oct 31, 2025
26e6db3
FIX: Plenty of fixes / small refactorings in coordination with @fmall…
Nov 4, 2025
7206140
FIX: reposition the call to evaluate() from calculate_metrics to main…
Nov 4, 2025
177f503
FEAT: Migrate metrics publishing from Prometheus Pushgateway to OpenT…
fmallmann Nov 6, 2025
d9ee520
FIX: TokenUsageParser now functions correctly even when using Non-LLM…
Nov 6, 2025
077fb5c
FIX: remove unused veriable 'df'
Nov 6, 2025
67890ea
FIX: remove unused variable 'results' in run.py
Nov 6, 2025
2659695
feat: initial tilt setup
fmallmann Nov 6, 2025
b05add2
FEAT: added Bandit, MyPy, Import-Linter, Poe, Ruff
Nov 6, 2025
7ceaa14
FIX: Formatting
Nov 6, 2025
7256b5d
FIX: Formatting
Nov 6, 2025
ceb727d
FIX: Add config for Import-Linter, Ruff & Bandit to pyproject.toml
Nov 6, 2025
ba1896c
FIX: Type Errors in run.py
Nov 6, 2025
ccca44a
FIX: Type Errors in setup.py
Nov 6, 2025
bdcd771
FIX: Remove unnecessary dependencies & add missing ones
Nov 6, 2025
52a1fd1
FIX: Type Errors in evaluate.py
Nov 6, 2025
18d23b8
FIX: Add scripts/ to mypy_path
Nov 6, 2025
374a0a2
FIX: Adapt test_e2e.py as a Pytest and add it to the Workflows
Nov 6, 2025
04f3423
FIX: Adapt test_publish.py to the OpenTelemetry OTLP, adjust Error in…
Nov 6, 2025
a2b54e2
FEAT: Use Python Version File to set Python Version
Nov 6, 2025
b794e5a
FIX: setup of test-testworkflows.yml
Nov 6, 2025
14f452c
FIX: setup of test-testworkflows.yml
Nov 6, 2025
bba0813
FEAT: add Tiltfile to test-testworkflows.yml to properly test test_e2…
Nov 6, 2025
ed96dfc
FEAT: add Tiltfile to test-testworkflows.yml to properly test test_e2…
Nov 6, 2025
ba60464
FIX: Type Error in evaluate.py
Nov 6, 2025
2f1d030
FIX: Tiltfile Error in test-testworkflows.yml
Nov 6, 2025
ba2ab17
FIX: Add GOOGLE_API_KEY Github Secret
Nov 6, 2025
49915fa
FIX: wait for Test-Data-Server to start up before running Pytests
Nov 6, 2025
2357fb3
FEAT: Implement Test-Data-Server in Github Action (Tilt CI shuts it d…
Nov 6, 2025
c71002f
FIX: no more double Test-Data-Server in CI
Nov 6, 2025
110da8e
FIX: add OPENAI_API_KEY Placeholder so test_e2e.py can run
Nov 6, 2025
607edef
FIX: add Timeout to Request
Nov 6, 2025
bc8b708
FIX: up2date uv.lock
Nov 6, 2025
0790d2b
FIX: ignore various low-risk warnings
Nov 6, 2025
644eeed
FEAT: Add Check Workflow that runs 'uv poe check'
Nov 6, 2025
3ab4003
FIX: incorrect path to python-version-file
Nov 6, 2025
760ec48
FIX: incorrect working-directory in check-testworkflows.yml
Nov 6, 2025
90971c0
Revert "FIX: incorrect working-directory in check-testworkflows.yml"
Nov 6, 2025
c5c13c8
Revert "FIX: incorrect path to python-version-file"
Nov 6, 2025
5a88a5d
Revert "FEAT: Add Check Workflow that runs 'uv poe check'"
Nov 6, 2025
364e707
REFACTOR: Adapt check-testworkflows.yml to run all checks instead of …
Nov 6, 2025
dd713c5
FIX: update pyproject.toml and uv.lock
Nov 6, 2025
4dd78b2
REFACTOR: create e2e_tests/ directory
Nov 11, 2025
d67f06f
REFACTOR: add test_e2e to POE tasks
Nov 11, 2025
2468e0f
REFACTOR: adapt test-e2e.yml to run the testworkflow e2e test
Nov 11, 2025
12bfa62
REFACTOR: rename to check.yml and remove E2E-Test scaffolding
Nov 11, 2025
f96c0ef
REFACTOR: replace Go Tests with Testworkflow Tests
Nov 11, 2025
0455815
FIX: Formatting
Nov 11, 2025
a73827e
FIX: Rename E2E Test folder
Nov 11, 2025
b555fbc
REFACTOR: divide dependencies into dev and prod
Nov 11, 2025
0a282f3
FIX: wrong directory for test_e2e
Nov 11, 2025
c7e6768
FIX: adapt uv commands to dev & prod dependencies
Nov 11, 2025
f462504
FIX: use native Pytest functionality instead of importing Unittest
Nov 11, 2025
4a1ce02
FIX: remove issues Linter & Bandit currently ignore
Nov 11, 2025
2b0e7b6
FIX: Formatting
Nov 11, 2025
0e81f9e
FIX: Imports
Nov 11, 2025
eef4a11
FIX: Imports
Nov 11, 2025
683fe7b
FIX: Update uv.lock
Nov 11, 2025
8474d8d
FEAT: Documentation for Testworkflows
Nov 11, 2025
95157a5
FIX: uv sync use prod dependencies
Nov 11, 2025
7042b2f
FIX: re-delete check-testworkflows.yml
Nov 11, 2025
f2012c2
FIX: correct paths
Nov 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#
# GitHub Action: Check
#
# This workflow is triggered on pushes to main and renovate branches, as well as
# pull requests. It runs backend checks to ensure code quality.
#
name: Check

on:
push:
branches:
- main
- 'renovate/**'
pull_request:

jobs:
test-testworkflows:
name: Runs on Ubuntu
runs-on: ubuntu-latest

defaults:
run:
working-directory: testworkflows

steps:
- name: Clone the code
uses: 'actions/checkout@v5'

- name: Install uv
uses: 'astral-sh/setup-uv@v6'
with:
version: "0.8.17"
enable-cache: true

- name: Setup Python
uses: 'actions/setup-python@v6'
with:
python-version-file: "testworkflows/.python-version"

- name: Install Dependencies
run: uv sync --group dev --group prod

- name: Run Checks
run: uv run poe check
15 changes: 15 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,21 @@ jobs:
run: |
make docker-buildx

- name: 'Set up Docker Buildx'
uses: docker/setup-buildx-action@v3

- name: 'Build & Push TestWorkflows Image'
uses: docker/build-push-action@v5
with:
context: ./testworkflows
file: ./testworkflows/Dockerfile
push: true
tags: |
ghcr.io/agentic-layer/testbench-operator/testworkflows:${{ github.ref_name }}
ghcr.io/agentic-layer/testbench-operator/testworkflows:latest
cache-from: type=gha
cache-to: type=gha,mode=max

- name: 'Setup Flux CLI'
uses: fluxcd/flux2/action@main

Expand Down
73 changes: 57 additions & 16 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#
# GitHub Action: E2E Tests
#
# This workflow is triggered on pushes to main and renovate branches, as well as
# pull requests. It runs E2E Tests to ensure the code is working.
#
name: E2E Tests

on:
Expand All @@ -7,32 +13,67 @@ on:
- 'renovate/**'
pull_request:

env:
# Required environment variables for the E2E test
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
OPENAI_API_KEY: PLACEHOLDER

jobs:
test-e2e:
test:
name: Run on Ubuntu
runs-on: ubuntu-latest
permissions:
contents: 'read'

defaults:
run:
working-directory: testworkflows

steps:
- name: Clone the code
uses: actions/checkout@v5
uses: 'actions/checkout@v5'

- name: Install uv
uses: 'astral-sh/setup-uv@v6'
with:
version: "0.8.17"
enable-cache: true

- name: Setup Go
uses: actions/setup-go@v6
- name: Setup Python
uses: 'actions/setup-python@v6'
with:
go-version-file: go.mod
python-version-file: "testworkflows/.python-version"

- name: Install Dependencies
run: uv sync --group dev --group prod

- name: Install the latest version of kind
- name: Set up Kubernetes (kind)
uses: 'helm/kind-action@v1'
with:
cluster_name: testbench-cluster

- name: Install Tilt
run: |
curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
curl -fsSL https://raw.githubusercontent.com/tilt-dev/tilt/master/scripts/install.sh | bash
tilt version

- name: Verify kind installation
run: kind version
- name: Start test data server
run: uv run python -m http.server 8000 --directory tests/test_data &

- name: Running Test e2e
- name: Start Tiltfile services
run: tilt ci
working-directory: .

- name: Wait for services to be ready
run: |
go mod tidy
make test-e2e
echo "Waiting for services to be ready..."
kubectl wait --for=condition=ready pod -l app=weather-agent --timeout=300s || true
kubectl wait --for=condition=ready pod -l app=ai-gateway-litellm --timeout=300s || true
kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=lgtm --timeout=300s || true

echo "Checking service status..."
kubectl get pods -A

echo "Waiting for test-data-server (HTTP server on port 8000)..."
curl --retry 30 --retry-delay 2 --retry-connrefused -f http://localhost:8000/dataset.json > /dev/null

- name: Running Test e2e
run: uv run poe test_e2e
33 changes: 25 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#
# GitHub Action: Test E2E
#
# This workflow is triggered on pushes to main and renovate branches, as well as
# pull requests. It runs Unit Tests to ensure the code is working.
#
name: Tests

on:
Expand All @@ -14,16 +20,27 @@ jobs:
permissions:
contents: 'read'

defaults:
run:
working-directory: testworkflows

steps:
- name: Clone the code
uses: actions/checkout@v5
uses: 'actions/checkout@v5'

- name: Install uv
uses: 'astral-sh/setup-uv@v6'
with:
version: "0.8.17"
enable-cache: true

- name: Setup Go
uses: actions/setup-go@v6
- name: Setup Python
uses: 'actions/setup-python@v6'
with:
go-version-file: go.mod
python-version-file: "testworkflows/.python-version"

- name: Install Dependencies
run: uv sync --group dev --group prod

- name: Running Tests
run: |
go mod tidy
make test
- name: Run Tests
run: uv run poe test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ go.work
*.swp
*.swo
*~

.env
38 changes: 38 additions & 0 deletions Tiltfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# -*- mode: Python -*-

# Increase Kubernetes upsert timeout for CRD installations
update_settings(max_parallel_updates=10)

# Load .env file for environment variables
load('ext://dotenv', 'dotenv')
dotenv()

v1alpha1.extension_repo(name='agentic-layer', url='https://github.com/agentic-layer/tilt-extensions', ref='v0.3.1')

v1alpha1.extension(name='cert-manager', repo_name='agentic-layer', repo_path='cert-manager')
load('ext://cert-manager', 'cert_manager_install')
cert_manager_install()

v1alpha1.extension(name='agent-runtime', repo_name='agentic-layer', repo_path='agent-runtime')
load('ext://agent-runtime', 'agent_runtime_install')
agent_runtime_install(version='0.9.0')

v1alpha1.extension(name='ai-gateway-litellm', repo_name='agentic-layer', repo_path='ai-gateway-litellm')
load('ext://ai-gateway-litellm', 'ai_gateway_litellm_install')
ai_gateway_litellm_install(version='0.2.0')

# Webserver to serve test data (disabled in CI - manually started instead)
if not os.getenv('CI'):
local_resource(
'test-data-server',
serve_cmd='python3 -m http.server 8000 --directory testworkflows/tests/test_data',
labels=['test-data'],
links=['http://localhost:8000/dataset.json']
)

# Apply Kubernetes manifests
k8s_yaml(kustomize('deploy/local'))

k8s_resource('ai-gateway-litellm', port_forwards=['11001:4000'])
k8s_resource('weather-agent', port_forwards='11010:8000', labels=['agents'], resource_deps=['agent-runtime'])
k8s_resource('lgtm', port_forwards=['11000:3000', '9090:9090', '4318:4318'])
5 changes: 5 additions & 0 deletions deploy/local/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- weather-agent.yaml
- lgtm.yaml
86 changes: 86 additions & 0 deletions deploy/local/lgtm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# this is intended for demo / testing purposes only, not for production usage
apiVersion: v1
kind: Namespace
metadata:
name: monitoring
---
apiVersion: v1
kind: Service
metadata:
name: lgtm
namespace: monitoring
spec:
selector:
app: lgtm
ports:
- name: grafana
protocol: TCP
port: 3000
targetPort: 3000
- name: otel-grpc
protocol: TCP
port: 4317
targetPort: 4317
- name: otel-http
protocol: TCP
port: 4318
targetPort: 4318
- name: prometheus
protocol: TCP
port: 9090
targetPort: 9090
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: lgtm
namespace: monitoring
spec:
replicas: 1
selector:
matchLabels:
app: lgtm
template:
metadata:
labels:
app: lgtm
spec:
containers:
- name: lgtm
image: grafana/otel-lgtm:latest
ports:
- containerPort: 3000
- containerPort: 4317
- containerPort: 4318
- containerPort: 9090
readinessProbe:
exec:
command:
- cat
- /tmp/ready
volumeMounts:
- name: tempo-data
mountPath: /data/tempo
- name: grafana-data
mountPath: /data/grafana
- name: loki-data
mountPath: /data/loki
- name: loki-storage
mountPath: /loki
- name: p8s-storage
mountPath: /data/prometheus
- name: pyroscope-storage
mountPath: /data/pyroscope
volumes:
- name: tempo-data
emptyDir: {}
- name: loki-data
emptyDir: {}
- name: grafana-data
emptyDir: {}
- name: loki-storage
emptyDir: {}
- name: p8s-storage
emptyDir: {}
- name: pyroscope-storage
emptyDir: {}
22 changes: 22 additions & 0 deletions deploy/local/weather-agent.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
kind: Namespace
apiVersion: v1
metadata:
name: sample-agents
---
apiVersion: runtime.agentic-layer.ai/v1alpha1
kind: Agent
metadata:
labels:
app.kubernetes.io/name: agent-runtime-operator
app.kubernetes.io/managed-by: kustomize
name: weather-agent
namespace: sample-agents
spec:
framework: google-adk
image: ghcr.io/agentic-layer/weather-agent:0.6.0
protocols:
- type: A2A
exposed: true
env:
- name: OTEL_SDK_DISABLED
value: "true"
Loading