Skip to content

Commit 3d0a0ed

Browse files
committed
GitHub Actions workflow for running integ tests
1 parent 09988a5 commit 3d0a0ed

File tree

3 files changed

+54
-3
lines changed

3 files changed

+54
-3
lines changed

.github/workflows/integ-tests.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Integ Tests
2+
3+
on:
4+
workflow_dispatch: {}
5+
6+
jobs:
7+
integ_tests:
8+
name: Run Integration Tests
9+
runs-on: ubuntu-latest
10+
permissions:
11+
id-token: write
12+
contents: read
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: "Set up Typescript"
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 20
20+
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v3
23+
with:
24+
enable-cache: true
25+
26+
- name: "Set up Python"
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version-file: "src/python/.python-version"
30+
31+
- name: Install CDK CLI
32+
run: npm install -g aws-cdk
33+
34+
- name: Configure AWS Credentials
35+
uses: aws-actions/configure-aws-credentials@v2
36+
with:
37+
role-to-assume: ${{ secrets.INTEG_TEST_ROLE_ARN }}
38+
aws-region: ${{ secrets.INTEG_TEST_REGION }}
39+
40+
- name: Run tests
41+
run: ./e2e_tests/run_integ_test.sh
42+
timeout-minutes: 15
43+
working-directory: ${{ github.workspace }}
44+
45+
- name: Clean up
46+
if: always()
47+
run: ./e2e_tests/clean_up_integ_test.sh
48+
working-directory: ${{ github.workspace }}

e2e_tests/run_integ_test.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ export INTEG_TEST_ID=$UUID
88
echo $INTEG_TEST_ID > ./e2e_tests/integ-test-id
99

1010
# Deploy Python-based example MCP server
11-
cd examples/servers/time
11+
cd src/python
12+
uv sync --frozen --all-extras --dev
13+
14+
cd ../../examples/servers/time
1215
uv pip install -r requirements.txt
1316
cdk deploy --app 'python3 cdk_stack.py'
1417

e2e_tests/typescript/src/chat_session.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ export class ChatSession {
8383

8484
for (const [i, userInput] of this.userUtterances.entries()) {
8585
if (i != 0) {
86-
console.log("\n**Pausing 5 seconds to avoid Bedrock throttling**");
87-
await new Promise((resolve) => setTimeout(resolve, 5000));
86+
console.log("\n**Pausing 30 seconds to avoid Bedrock throttling**");
87+
await new Promise((resolve) => setTimeout(resolve, 30 * 1000));
8888
}
8989

9090
console.log(`\You: ${userInput}`);

0 commit comments

Comments
 (0)