-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: run integration tests against different versions (#226)
- Loading branch information
Showing
5 changed files
with
178 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
name: Integration Tests Latest | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- "**/*.md" | ||
- "**/*.jpg" | ||
- "**/README.txt" | ||
- "**/LICENSE.txt" | ||
- "docs/**" | ||
- "ISSUE_TEMPLATE/**" | ||
- "**/remove-old-artifacts.yml" | ||
|
||
jobs: | ||
run-integration-tests: | ||
name: Run Integration Tests with Latest | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 50 | ||
|
||
- name: "Set up JDK 8" | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: "corretto" | ||
java-version: 8 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "20.x" | ||
- name: Install dependencies | ||
run: npm install --no-save | ||
|
||
- 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-aurora --info | ||
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 }} | ||
NUM_INSTANCES: 5 | ||
AURORA_MYSQL_DB_ENGINE_VERSION: "latest" | ||
AURORA_PG_DB_ENGINE_VERSION: "latest" | ||
|
||
- name: "Get Github Action IP" | ||
if: always() | ||
id: ip | ||
uses: haythem/[email protected] | ||
|
||
- name: "Remove Github Action IP" | ||
if: always() | ||
run: | | ||
aws ec2 revoke-security-group-ingress \ | ||
--group-name default \ | ||
--protocol -1 \ | ||
--port -1 \ | ||
--cidr ${{ steps.ip.outputs.ipv4 }}/32 \ | ||
2>&1 > /dev/null; | ||
- name: Archive results | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: integration-report-latest | ||
path: ./tests/integration/container/reports | ||
retention-days: 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters