feat: GDB Failover #934
Workflow file for this run
This file contains hidden or 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
| name: Integration Tests | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - "**/*.md" | |
| - "**/*.jpg" | |
| - "**/README.txt" | |
| - "**/LICENSE.txt" | |
| - "docs/**" | |
| - "ISSUE_TEMPLATE/**" | |
| - "**/remove-old-artifacts.yml" | |
| pull_request: | |
| branches: | |
| - dev/v3 | |
| permissions: | |
| id-token: write # This is required for requesting the JWT | |
| contents: read # This is required for actions/checkout | |
| jobs: | |
| run-integration-tests-default: | |
| name: Run Integration Tests (Default) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| dbEngine: ["aurora-mysql", "aurora-postgres"] | |
| steps: | |
| - name: Clone repository | |
| uses: actions/checkout@v4 | |
| - 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@v4 | |
| with: | |
| node-version: "20.x" | |
| - name: Install dependencies | |
| run: npm install --no-save | |
| - 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: nodejs_int_default_tests | |
| role-duration-seconds: 21600 | |
| aws-region: ${{ secrets.AWS_DEFAULT_REGION }} | |
| output-credentials: true | |
| - name: Run Integration Tests | |
| run: | | |
| ./gradlew --no-parallel --no-daemon test-${{ matrix.dbEngine }} --info | |
| env: | |
| 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 }} | |
| AURORA_MYSQL_DB_ENGINE_VERSION: default | |
| AURORA_PG_DB_ENGINE_VERSION: default | |
| - name: "Get Github Action IP" | |
| if: always() | |
| id: ip | |
| uses: haythem/public-ip@v1.3 | |
| - 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-default-${{ matrix.dbEngine }} | |
| path: ./tests/integration/container/reports | |
| retention-days: 5 | |
| run-integration-tests-latest: | |
| name: Run Integration Tests (Latest) | |
| runs-on: ubuntu-latest | |
| needs: run-integration-tests-default | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| dbEngine: ["aurora-mysql", "aurora-postgres" ] | |
| steps: | |
| - name: Clone repository | |
| uses: actions/checkout@v4 | |
| - 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@v4 | |
| with: | |
| node-version: "20.x" | |
| - name: Install dependencies | |
| run: npm install --no-save | |
| - 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: nodejs_int_latest_tests | |
| aws-region: ${{ secrets.AWS_DEFAULT_REGION }} | |
| output-credentials: true | |
| - name: Run Integration Tests | |
| run: | | |
| ./gradlew --no-parallel --no-daemon test-${{ matrix.dbEngine }} --info | |
| env: | |
| 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 }} | |
| AURORA_MYSQL_DB_ENGINE_VERSION: latest | |
| AURORA_PG_DB_ENGINE_VERSION: latest | |
| - name: "Get Github Action IP" | |
| if: always() | |
| id: ip | |
| uses: haythem/public-ip@v1.3 | |
| - 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-${{ matrix.dbEngine }} | |
| path: ./tests/integration/container/reports | |
| retention-days: 5 |