forked from red-hat-data-services/agentic-starter-kits
-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (77 loc) · 2.64 KB
/
agent-deployment-test.yaml
File metadata and controls
89 lines (77 loc) · 2.64 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# QG4: Agent Deployment Health Checks
#
# Nightly workflow: logs into the OpenShift demo cluster, deploys each
# agent via build-openshift + Helm, validates GET /health, and tears down.
name: "QG4: Agent Deployment Integration Tests"
on:
schedule:
- cron: "0 3 * * *" # 11 PM EDT / 10 PM EST
workflow_dispatch:
permissions:
contents: read
jobs:
verify-cluster-connection:
name: "Verify Cluster Connection"
if: github.repository == 'red-hat-data-services/agentic-starter-kits'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup cluster tools
uses: ./.github/actions/setup-cluster
with:
oc-token: ${{ secrets.OC_TOKEN }}
cluster-api-url: ${{ secrets.CLUSTER_API_URL }}
- name: Verify cluster connection
run: |
set -o pipefail
echo "--- Logged in as ---"
oc whoami
echo ""
echo "--- Current project ---"
oc project
echo ""
echo "--- Namespace resources ---"
oc get all -n ci-testing --no-headers 2>&1 | head -10 || true
echo ""
echo "Cluster connection verified successfully."
- name: Logout
if: always()
run: oc logout || true
test-agent:
name: "${{ matrix.agent.name }}"
needs: verify-cluster-connection
if: github.repository == 'red-hat-data-services/agentic-starter-kits'
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
agent:
- { name: langgraph-react-agent, dir: agents/langgraph/react_agent }
- { name: langgraph-hitl-agent, dir: agents/langgraph/human_in_the_loop }
env:
API_KEY: ${{ vars.API_KEY }}
BASE_URL: ${{ vars.BASE_URL }}
MODEL_ID: ${{ vars.MODEL_ID }}
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup cluster tools
uses: ./.github/actions/setup-cluster
with:
oc-token: ${{ secrets.OC_TOKEN }}
cluster-api-url: ${{ secrets.CLUSTER_API_URL }}
- name: Run integration test
working-directory: ${{ matrix.agent.dir }}
run: make test-integration
- name: Upload test results
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: ${{ matrix.agent.name }}-results
path: ${{ matrix.agent.dir }}/results.xml
- name: Logout
if: always()
run: oc logout || true