-
Notifications
You must be signed in to change notification settings - Fork 24
59 lines (50 loc) · 2.18 KB
/
wrp-tests.yml
File metadata and controls
59 lines (50 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: WRP Framework Tests
# This workflow tests the WRP (Universal Scientific MCP Client) framework with agent integration
#
# Setup Requirements:
# 1. Create a GitHub environment named "ai-testing"
# 2. Add ANTHROPIC_API_KEY and/or GEMINI_API_KEY as secrets in that environment
# 3. Tests will run if at least one API key is available, otherwise skip
#
on:
workflow_dispatch: # Manual trigger only - requires API keys in ai-testing environment
jobs:
wrp-tests:
runs-on: ubuntu-latest
environment: ai-testing # This environment should have ANTHROPIC_API_KEY secret
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Check if API keys are available
id: check-api-keys
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
run: |
if [ -z "$ANTHROPIC_API_KEY" ] && [ -z "$GEMINI_API_KEY" ]; then
echo "api_keys_available=false" >> $GITHUB_OUTPUT
echo "Neither ANTHROPIC_API_KEY nor GEMINI_API_KEY available in ai-testing environment"
else
echo "api_keys_available=true" >> $GITHUB_OUTPUT
echo "At least one API key is available:"
[ -n "$ANTHROPIC_API_KEY" ] && echo " - ANTHROPIC_API_KEY: available"
[ -n "$GEMINI_API_KEY" ] && echo " - GEMINI_API_KEY: available"
fi
- name: Install uv
if: steps.check-api-keys.outputs.api_keys_available == 'true'
uses: astral-sh/setup-uv@v3
- name: Install dependencies
if: steps.check-api-keys.outputs.api_keys_available == 'true'
run: uv pip install --system pytest pytest-asyncio jsonschema pyyaml mcp fastapi uvicorn requests feedparser
- name: Run WRP Framework Tests
if: steps.check-api-keys.outputs.api_keys_available == 'true'
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
run: |
echo "Running WRP framework tests..."
python -m pytest clio-kit-mcp-clients/wrp_bin/test/test_wrp_framework.py -v --tb=short