|
| 1 | +name: Blue/Green Integration Tests |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + push: |
| 6 | + branches: |
| 7 | + - main |
| 8 | + paths-ignore: |
| 9 | + - '**/*.md' |
| 10 | + - '**/*.jpg' |
| 11 | + - '**/README.txt' |
| 12 | + - '**/LICENSE.txt' |
| 13 | + - 'docs/**' |
| 14 | + - 'ISSUE_TEMPLATE/**' |
| 15 | + - '**/remove-old-artifacts.yml' |
| 16 | + |
| 17 | +concurrency: |
| 18 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 19 | + cancel-in-progress: false |
| 20 | + |
| 21 | +permissions: |
| 22 | + id-token: write # This is required for requesting the JWT |
| 23 | + contents: read # This is required for actions/checkout |
| 24 | + |
| 25 | +jobs: |
| 26 | + blue-green-integration-tests: |
| 27 | + name: Run Blue/Green Integration Tests |
| 28 | + runs-on: ubuntu-latest |
| 29 | + timeout-minutes: 120 |
| 30 | + strategy: |
| 31 | + fail-fast: false |
| 32 | + max-parallel: 2 |
| 33 | + matrix: |
| 34 | + task: [ "mysql-aurora-sync", "mysql-aurora-async", "pg-aurora-sync", "pg-aurora-async" ] |
| 35 | + |
| 36 | + steps: |
| 37 | + - name: 'Clone repository' |
| 38 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 |
| 39 | + |
| 40 | + - name: 'Set up JDK 8' |
| 41 | + uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 |
| 42 | + with: |
| 43 | + distribution: 'corretto' |
| 44 | + java-version: 8 |
| 45 | + |
| 46 | + - name: Install poetry |
| 47 | + shell: bash |
| 48 | + run: | |
| 49 | + pipx install poetry==1.8.2 |
| 50 | + poetry config virtualenvs.prefer-active-python true |
| 51 | +
|
| 52 | + - name: Install dependencies |
| 53 | + run: poetry install |
| 54 | + |
| 55 | + - name: 'Configure AWS Credentials' |
| 56 | + uses: aws-actions/configure-aws-credentials@d979d5b3a71173a29b74b5b88418bfda9437d885 # v6 |
| 57 | + with: |
| 58 | + role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/${{ secrets.AWS_DEPLOY_ROLE }} |
| 59 | + role-session-name: python_bg_integration_tests |
| 60 | + role-duration-seconds: 21600 |
| 61 | + aws-region: ${{ secrets.AWS_DEFAULT_REGION }} |
| 62 | + |
| 63 | + - name: 'Run Blue/Green Integration Tests' |
| 64 | + run: | |
| 65 | + ./gradlew --no-parallel --no-daemon test-bgd-${{ matrix.task }} --info |
| 66 | + env: |
| 67 | + RDS_DB_REGION: ${{ secrets.AWS_DEFAULT_REGION }} |
| 68 | + MYSQL_VERSION: default |
| 69 | + PG_VERSION: default |
| 70 | + |
| 71 | + - name: 'Archive Blue/Green results' |
| 72 | + if: always() |
| 73 | + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
| 74 | + with: |
| 75 | + name: pytest-integration-report-bgd-${{ matrix.task }} |
| 76 | + path: ./tests/integration/container/reports |
| 77 | + retention-days: 5 |
0 commit comments