-
Notifications
You must be signed in to change notification settings - Fork 391
147 lines (131 loc) · 6 KB
/
heavy-tests.yml
File metadata and controls
147 lines (131 loc) · 6 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
name: Heavy Tests
on:
workflow_dispatch: # Manual trigger
push:
paths-ignore:
- examples/**
- docs/**
- inspections/**
- "*.md"
branches: [ main, develop ]
env:
AWS_REGION: us-west-2
KOOG_HEAVY_TESTS: true
jobs:
integration-tests:
name: ${{ matrix.job-name }}
runs-on: ${{ matrix.os }}
permissions:
contents: read
id-token: write # Required for OIDC authentication
timeout-minutes: 90 # Prevent hanging builds
strategy:
matrix:
include:
- job-name: "java-api-tests"
test-group: "ai.koog.integration.tests.agent.Java*"
artifact-name: "java-api-tests"
os: ubuntu-latest
- job-name: "agent-tests"
test-group: "ai.koog.integration.tests.agent.AIAgent*"
artifact-name: "agent-tests"
os: ubuntu-latest
- job-name: "multiple-llm-executor-tests"
test-group: "ai.koog.integration.tests.executor.MultipleLLMPromptExecutorIntegrationTest"
artifact-name: "multiple-llm-executor-tests"
os: ubuntu-latest
- job-name: "bedrock-tests"
test-group: "ai.koog.integration.tests.executor.BedrockExecutorIntegrationTest"
artifact-name: "bedrock-tests"
os: ubuntu-latest
- job-name: "other-executor-tests"
test-group: '"ai.koog.integration.tests.executor.BedrockConverseApiIntegrationTest" --tests "ai.koog.integration.tests.executor.ToolDescriptorIntegrationTest" --tests "ai.koog.integration.tests.executor.ToolSchemaExecutorIntegrationTest"'
artifact-name: "other-executor-tests"
os: ubuntu-latest
- job-name: "capabilities-tests"
test-group: "ai.koog.integration.tests.capabilities.*"
artifact-name: "capabilities-tests"
os: ubuntu-latest
- job-name: "embeddings-tests"
test-group: "ai.koog.integration.tests.*Embeddings*"
artifact-name: "embeddings-test"
os: ubuntu-latest
- job-name: "anthropic-schema-tests"
test-group: "ai.koog.integration.tests.*AnthropicSchemaValidation*"
artifact-name: "anthropic-schema-test"
os: ubuntu-latest
fail-fast: false
steps:
- name: Configure Git
run: |
git config --global core.autocrlf input
- uses: actions/checkout@v6
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
java-version: 17
distribution: corretto
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
- name: Configure AWS credentials via OIDC
uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME_KOOG }}
aws-region: ${{ env.AWS_REGION }}
role-session-name: GitHub-Actions-Koog-Integration-Tests
role-duration-seconds: 10800 # 3 hours (3 * 60 * 60)
- name: Verify AWS Identity and Bedrock access
if: ${{ matrix.job-name == 'bedrock-tests' || matrix.job-name == 'other-executor-tests' }}
run: |
echo "Verifying AWS identity..."
aws sts get-caller-identity
echo "AWS region: $AWS_REGION"
echo "Testing Bedrock access..."
aws bedrock list-foundation-models --query 'modelSummaries[*].[modelId,providerName]' --output table || {
echo "Bedrock access test failed"
exit 1
}
echo "Bedrock access verified!"
- name: Run Bedrock Credentials Smoke Test
if: ${{ matrix.job-name == 'bedrock-tests' || matrix.job-name == 'other-executor-tests' }}
run: |
echo "Running Bedrock credentials smoke test..."
./gradlew :integration-tests:cleanJvmTest :integration-tests:jvmTest --tests "ai.koog.integration.tests.BedrockCredentialsSmokeTest"
echo "Bedrock credentials smoke test passed!"
- name: JvmIntegrationTest with Gradle Wrapper
env:
JAVA_OPTS: "-Xms8g -Xmx8g -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Dkotlin.daemon.jvm.options=-Xmx6g"
ANTHROPIC_API_TEST_KEY: ${{ secrets.ANTHROPIC_API_TEST_KEY }}
AWS_BEDROCK_GUARDRAIL_ID: ${{ secrets.AWS_BEDROCK_GUARDRAIL_ID }}
AWS_BEDROCK_GUARDRAIL_VERSION: ${{ secrets.AWS_BEDROCK_GUARDRAIL_VERSION }}
DEEPSEEK_API_TEST_KEY: ${{ secrets.DEEPSEEK_API_TEST_KEY }}
GEMINI_API_TEST_KEY: ${{ secrets.GEMINI_API_TEST_KEY }}
MISTRAL_AI_API_TEST_KEY: ${{ secrets.MISTRAL_AI_API_TEST_KEY }}
OPEN_AI_API_TEST_KEY: ${{ secrets.OPEN_AI_API_TEST_KEY }}
OPEN_ROUTER_API_TEST_KEY: ${{ secrets.OPEN_ROUTER_API_TEST_KEY }}
run: ./gradlew jvmIntegrationTest --tests ${{ matrix.test-group }} --continue
- name: Collect reports
if: always()
uses: actions/upload-artifact@v7
with:
name: reports-${{ matrix.os }}-${{ matrix.artifact-name }}
path: |
**/build/reports/
- name: Publish Test Report
uses: mikepenz/action-junit-report@v6
if: ${{ !cancelled() }} # always run even if the previous step fails
with:
report_paths: '**/test-results/**/TEST-*.xml'
detailed_summary: true
flaky_summary: true
include_empty_in_summary: false
include_time_in_summary: true
annotate_only: true