generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathintegration_tests_codebuild.yml
More file actions
65 lines (54 loc) · 2.02 KB
/
integration_tests_codebuild.yml
File metadata and controls
65 lines (54 loc) · 2.02 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
name: Integration Tests CodeBuild
on:
workflow_dispatch:
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
build-integration-tests-codebuild:
name: Run Integration Tests With CodeBuild
strategy:
fail-fast: false
matrix:
python-version: [ "3.11", "3.12", "3.13" ]
environment: [ "mysql", "pg" ]
runs-on: ubuntu-latest
environment: ${{ matrix.environment }}_integ
steps:
- name: 'Clone repository'
uses: actions/checkout@v4
- name: 'Set up JDK 8'
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: 8
- name: Install poetry
shell: bash
run: |
pipx install poetry==1.8.2
poetry config virtualenvs.prefer-active-python true
- name: Install dependencies
run: poetry install
- name: 'Configure AWS Credentials'
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/${{ secrets.AWS_DEPLOY_ROLE }}
role-session-name: python_integration_codebuild_tests
role-duration-seconds: 21600
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
- name: 'Run Integration Tests'
run: |
./gradlew --no-parallel --no-daemon test-python-${{ matrix.python-version }}-${{ matrix.environment }} --info
env:
RDS_CLUSTER_DOMAIN: ${{ secrets.DB_CONN_SUFFIX }}
RDS_DB_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
RDS_ENDPOINT: ${{ secrets.RDS_ENDPOINT }}
AURORA_MYSQL_DB_ENGINE_VERSION: "latest"
AURORA_PG_ENGINE_VERSION: "latest"
- name: 'Archive results'
if: always()
uses: actions/upload-artifact@v4
with:
name: pytest-integration-report-${{ matrix.python-version }}-${{ matrix.environment }}
path: ./tests/integration/container/reports
retention-days: 5