Repository navigation
76 lines (63 loc) · 2.85 KB
/
Copy pathpg_performance-codebuild.yml
File metadata and controls
76 lines (63 loc) · 2.85 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
# CodeBuild variant of pg_performance.yml.
#
# Runs the same job on the self-hosted CodeBuild runners instead of GitHub-hosted ones.
# Trigger: manual dispatch only, the same as pg_performance.yml.
# Uses a per-ref concurrency group with cancel-in-progress, so a newer run on the same ref
# supersedes the one in progress.
name: Run Aurora PostgreSQL Performance Tests (CodeBuild)
on:
workflow_dispatch:
permissions:
id-token: write
contents: read
env:
# Pull test container images from ECR Public rather than Docker Hub. CodeBuild builds egress
# through the account's shared NAT IP and carry no Docker Hub credentials, so anonymous Docker Hub
# pulls get rate limited.
TEST_CONTAINER_REGISTRY: ecr
concurrency:
# One run per workflow per ref: a newer run on the same ref cancels the one in progress, so a new
# push supersedes a stale commit. The "Clean up RDS resources" step runs on cancellation, so a
# superseded run tears down the DB clusters it created instead of leaking them.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
aurora-pg-performance-tests:
name: 'Run Aurora PostgreSQL performance tests'
runs-on: codebuild-rubyWrapper-${{ github.run_id }}-${{ github.run_attempt }}
steps:
- name: 'Clone repository'
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: 'Validate Gradle wrapper'
uses: gradle/actions/wrapper-validation@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1
- name: 'Set up Ruby 3.3'
uses: ruby/setup-ruby@145243922b4465b78e04dd66294782c7de45901f # v1
with:
ruby-version: '3.3'
bundler-cache: true
- name: 'Set up JDK 8'
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0
with:
distribution: 'corretto'
java-version: 8
- name: 'Configure AWS Credentials'
uses: aws-actions/configure-aws-credentials@45666896f5d8e0f10ae255413f3a4cdd03bdc8f5 # v6
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/${{ secrets.AWS_DEPLOY_ROLE }}
role-session-name: ruby_perf_test_pg
role-duration-seconds: 21600
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
- name: 'Run PostgreSQL performance tests'
run: ./gradlew --no-parallel --no-daemon :integration-testing:test-ruby-3.3-pg-performance --info
env:
RDS_DB_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
- name: 'Archive performance results'
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: 'pg-performance-results'
path: |
./spec/integration/host/build/reports/tests/test/
./spec/integration/container/reports/
if-no-files-found: ignore
retention-days: 5