-
Notifications
You must be signed in to change notification settings - Fork 43
93 lines (80 loc) · 2.62 KB
/
integ-tests.yml
File metadata and controls
93 lines (80 loc) · 2.62 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
name: Integ Tests
on:
workflow_dispatch: {}
workflow_call:
secrets:
INTEG_TEST_ROLE_ARN:
required: true
description: ""
INTEG_TEST_REGION:
required: true
description: ""
INTEG_TEST_AWS_ACCOUNT_ID:
required: true
description: ""
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
integ_tests:
name: Run Integration Tests
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: "Check secrets"
run: |
if [ -z "${{ secrets.INTEG_TEST_ROLE_ARN }}" ]; then echo "Secret missing: INTEG_TEST_ROLE_ARN" && exit 1; fi
if [ -z "${{ secrets.INTEG_TEST_REGION }}" ]; then echo "Secret missing: INTEG_TEST_REGION" && exit 1; fi
if [ -z "${{ secrets.INTEG_TEST_AWS_ACCOUNT_ID }}" ]; then echo "Secret missing: INTEG_TEST_AWS_ACCOUNT_ID" && exit 1; fi
- name: "Set up Typescript"
uses: actions/setup-node@v4
with:
node-version: 24
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: "src/python/.python-version"
- name: Install CDK CLI
run: npm install -g aws-cdk
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.INTEG_TEST_ROLE_ARN }}
aws-region: ${{ secrets.INTEG_TEST_REGION }}
- name: Setup test environments
run: |
cd src/python
uv venv
if [ -f .venv/bin/activate ]; then source .venv/bin/activate; else echo "Virtual environment activation failed" && exit 1; fi
cd ../..
./e2e_tests/setup_integ_test.sh
timeout-minutes: 40
working-directory: ${{ github.workspace }}
- name: Run Python tests
run: |
source src/python/.venv/bin/activate
./e2e_tests/run_python_integ_test.sh
timeout-minutes: 20
working-directory: ${{ github.workspace }}
- name: Run Typescript tests
run: |
./e2e_tests/run_typescript_integ_test.sh
timeout-minutes: 20
working-directory: ${{ github.workspace }}
- name: Clean up
if: always()
run: |
source src/python/.venv/bin/activate
./e2e_tests/clean_up_integ_test.sh
working-directory: ${{ github.workspace }}