-
Notifications
You must be signed in to change notification settings - Fork 48
76 lines (73 loc) · 2.75 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
67
68
69
70
71
72
73
74
75
76
name: Run Aurora Integration Tests CodeBuild
on:
workflow_dispatch:
push:
branches:
- main
- workflow
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
aurora-integration-tests:
strategy:
matrix:
engine_version: ["lts"]
environment: ["pg_integ"]
runs-on: codebuild-jdbcWrapper-${{ github.run_id }}-${{ github.run_attempt }}
environment: ${{ matrix.environment }}
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'
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
- name: 'Set up temp AWS credentials'
run: |
creds=($(aws sts get-session-token \
--duration-seconds 21600 \
--query 'Credentials.[AccessKeyId, SecretAccessKey, SessionToken]' \
--output text \
| xargs));
echo "::add-mask::${creds[0]}"
echo "::add-mask::${creds[1]}"
echo "::add-mask::${creds[2]}"
echo "TEMP_AWS_ACCESS_KEY_ID=${creds[0]}" >> $GITHUB_ENV
echo "TEMP_AWS_SECRET_ACCESS_KEY=${creds[1]}" >> $GITHUB_ENV
echo "TEMP_AWS_SESSION_TOKEN=${creds[2]}" >> $GITHUB_ENV
- name: Run integration tests
run: |
./gradlew --no-parallel --no-daemon test-all-aurora
env:
AURORA_CLUSTER_DOMAIN: ${{ secrets.DB_CONN_SUFFIX }}
AURORA_DB_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AWS_ACCESS_KEY_ID: ${{ env.TEMP_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ env.TEMP_AWS_SECRET_ACCESS_KEY }}
AWS_SESSION_TOKEN: ${{ env.TEMP_AWS_SESSION_TOKEN }}
RDS_ENDPOINT: ${{ secrets.RDS_ENDPOINT }}
AURORA_MYSQL_DB_ENGINE_VERSION: ${{ matrix.engine_version }}
AURORA_PG_ENGINE_VERSION: ${{ matrix.engine_version }}
- 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