-
Notifications
You must be signed in to change notification settings - Fork 53
66 lines (62 loc) · 2.36 KB
/
run-integration-tests-codebuild.yml
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
name: Run Aurora 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
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
aurora-integration-tests:
strategy:
matrix:
engine_version: ["latest"]
environment: ["mysql", "pg"]
runs-on: codebuild-jdbcWrapper-${{ github.run_id }}-${{ github.run_attempt }}
environment: ${{ matrix.environment }}_integ
steps:
- name: 'Clone repository'
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: 'Set up JDK 8'
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: 8
- name: 'Configure AWS credentials'
id: creds
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: run_integration_test_codebuild
role-duration-seconds: 28800
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
output-credentials: true
- name: Run integration tests
run: |
./gradlew --no-parallel --no-daemon test-all-${{ matrix.environment }}-aurora
env:
AURORA_CLUSTER_DOMAIN: ${{ secrets.DB_CONN_SUFFIX }}
RDS_DB_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AWS_ACCESS_KEY_ID: ${{ steps.creds.outputs.aws-access-key-id }}
AWS_SECRET_ACCESS_KEY: ${{ steps.creds.outputs.aws-secret-access-key }}
AWS_SESSION_TOKEN: ${{ steps.creds.outputs.aws-session-token }}
RDS_ENDPOINT: ${{ secrets.RDS_ENDPOINT }}
MYSQL_VERSION: "latest"
PG_VERSION: "latest"
- name: 'Archive junit results ${{ matrix.engine_version }}'
if: always()
uses: actions/upload-artifact@v4
with:
name: junit-report-${{ matrix.engine_version }}
path: ./wrapper/build/test-results
retention-days: 5
- name: 'Archive html summary report ${{ matrix.engine_version }}'
if: always()
uses: actions/upload-artifact@v4
with:
name: html-summary-report-${{ matrix.engine_version }}
path: ./wrapper/build/report
retention-days: 5