Repository navigation
chore: trigger tests #971
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: | |
| push: | |
| branches: | |
| - main | |
| - chore/run-integration-tests-on-codebuild | |
| paths-ignore: | |
| - '**/*.md' | |
| - '**/*.jpg' | |
| - '**/README.txt' | |
| - '**/LICENSE.txt' | |
| - 'docs/**' | |
| - 'ISSUE_TEMPLATE/**' | |
| - '**/remove-old-artifacts.yml' | |
| pull_request_target: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '**/*.md' | |
| - '**/*.jpg' | |
| - '**/README.txt' | |
| - '**/LICENSE.txt' | |
| - 'docs/**' | |
| - 'ISSUE_TEMPLATE/**' | |
| - '**/remove-old-artifacts.yml' | |
| workflow_dispatch: | |
| inputs: | |
| ref: | |
| description: 'Git ref (branch, tag, or SHA) to test' | |
| required: false | |
| type: string | |
| repository: | |
| description: 'Repository to test in the form owner/repo (use for fork branches)' | |
| required: false | |
| type: string | |
| permissions: | |
| id-token: write # This is required for requesting the JWT | |
| contents: read # This is required for actions/checkout | |
| jobs: | |
| approve: | |
| # Auto-approve for non-fork scenarios (push, manual dispatch, or PR from the same repo) | |
| if: > | |
| github.event_name == 'push' || | |
| github.event_name == 'workflow_dispatch' || | |
| github.event.pull_request.head.repo.full_name == github.repository | |
| runs-on: ubuntu-latest | |
| steps: | |
| - run: echo "Approved - not a fork PR" | |
| approve-fork: | |
| # Require manual maintainer approval (via the integration-tests environment) for fork PRs | |
| if: > | |
| github.event_name == 'pull_request_target' && | |
| github.event.pull_request.head.repo.full_name != github.repository | |
| runs-on: ubuntu-latest | |
| environment: integration-tests | |
| steps: | |
| - run: echo "Fork PR approved by maintainer" | |
| lts-integration-tests: | |
| name: Run LTS Integration Tests | |
| needs: [ approve, approve-fork ] | |
| if: | | |
| always() && | |
| (needs.approve.result == 'success' || needs.approve-fork.result == 'success') && | |
| !(needs.approve.result == 'failure' || needs.approve-fork.result == 'failure') | |
| runs-on: | |
| - codebuild-pythonWrapper-${{ github.run_id }}-${{ github.run_attempt }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: [ "3.11", "3.12", "3.13" ] | |
| environment: [ "mysql", "pg" ] | |
| steps: | |
| - name: 'Clone repository' | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| repository: ${{ github.event.pull_request.head.repo.full_name || inputs.repository || github.repository }} | |
| ref: ${{ github.event.pull_request.head.sha || inputs.ref || github.sha }} | |
| - name: 'Set up JDK 8' | |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 | |
| with: | |
| distribution: 'corretto' | |
| java-version: 8 | |
| - name: 'Set up Python ${{ matrix.python-version }}' | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install poetry | |
| shell: bash | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install pipx | |
| python -m pipx install poetry==1.8.2 | |
| python -m pipx ensurepath | |
| poetry config virtualenvs.prefer-active-python true | |
| - name: Install dependencies | |
| run: poetry install | |
| - name: 'Configure AWS Credentials' | |
| uses: aws-actions/configure-aws-credentials@d979d5b3a71173a29b74b5b88418bfda9437d885 # v6 | |
| with: | |
| role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/${{ secrets.AWS_DEPLOY_ROLE }} | |
| role-session-name: python_integration_tests | |
| role-duration-seconds: 21600 | |
| aws-region: ${{ secrets.AWS_DEFAULT_REGION }} | |
| - name: 'Run LTS Integration Tests' | |
| run: | | |
| ./gradlew --no-parallel --no-daemon test-python-${{ matrix.python-version }}-${{ matrix.environment }} --info | |
| env: | |
| RDS_CLUSTER_DOMAIN: ${{ secrets.DB_CONN_SUFFIX }} | |
| RDS_DB_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | |
| AURORA_MYSQL_DB_ENGINE_VERSION: lts | |
| AURORA_PG_ENGINE_VERSION: lts | |
| - name: 'Archive LTS results' | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: pytest-integration-report-${{ matrix.python-version }}-${{ matrix.environment }}-lts | |
| path: ./tests/integration/container/reports | |
| retention-days: 5 | |
| latest-integration-tests: | |
| name: Run Latest Integration Tests | |
| runs-on: codebuild-pythonWrapper-${{ github.run_id }}-${{ github.run_attempt }} | |
| needs: lts-integration-tests | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: [ "3.11", "3.12", "3.13" ] | |
| environment: [ "mysql", "pg" ] | |
| steps: | |
| - name: 'Clone repository' | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| repository: ${{ github.event.pull_request.head.repo.full_name || inputs.repository || github.repository }} | |
| ref: ${{ github.event.pull_request.head.sha || inputs.ref || github.sha }} | |
| - name: 'Set up JDK 8' | |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 | |
| with: | |
| distribution: 'corretto' | |
| java-version: 8 | |
| - name: 'Set up Python ${{ matrix.python-version }}' | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install poetry | |
| shell: bash | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install pipx | |
| python -m pipx install poetry==1.8.2 | |
| python -m pipx ensurepath | |
| poetry config virtualenvs.prefer-active-python true | |
| - name: Install dependencies | |
| run: poetry install | |
| - name: 'Configure AWS Credentials' | |
| uses: aws-actions/configure-aws-credentials@d979d5b3a71173a29b74b5b88418bfda9437d885 # v6 | |
| with: | |
| role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/${{ secrets.AWS_DEPLOY_ROLE }} | |
| role-session-name: python_integration_tests | |
| role-duration-seconds: 21600 | |
| aws-region: ${{ secrets.AWS_DEFAULT_REGION }} | |
| - name: 'Run Latest Integration Tests' | |
| run: | | |
| ./gradlew --no-parallel --no-daemon test-python-${{ matrix.python-version }}-${{ matrix.environment }} --info | |
| env: | |
| RDS_CLUSTER_DOMAIN: ${{ secrets.DB_CONN_SUFFIX }} | |
| RDS_DB_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | |
| AURORA_MYSQL_DB_ENGINE_VERSION: latest | |
| AURORA_PG_ENGINE_VERSION: latest | |
| - name: 'Archive Latest results' | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: pytest-integration-report-${{ matrix.python-version }}-${{ matrix.environment }}-latest | |
| path: ./tests/integration/container/reports | |
| retention-days: 5 |