fix: test results (#526) #576
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
name: Integration Tests | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
build-integration-tests: | |
name: Run Integration Tests | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [ "3.8", "3.11" ] | |
engine-version: [ "lts", "latest"] | |
environment: ["mysql", "pg"] | |
steps: | |
- name: 'Clone repository' | |
uses: actions/checkout@v4 | |
- name: 'Set up JDK 8' | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'corretto' | |
java-version: 8 | |
- name: Install poetry | |
uses: abatilo/actions-poetry@v3 | |
with: | |
poetry-version: '1.8.2' | |
- name: Install dependencies | |
run: poetry install | |
- 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-python-${{ matrix.python-version }}-${{ matrix.environment }} --info | |
env: | |
RDS_CLUSTER_DOMAIN: ${{ secrets.DB_CONN_SUFFIX }} | |
RDS_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 }} | |
AURORA_MYSQL_DB_ENGINE_VERSION: ${{ matrix.engine-version }} | |
AURORA_PG_ENGINE_VERSION: ${{ matrix.engine-version }} | |
- name: 'Archive results' | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pytest-integration-report-${{ matrix.python-version }}-${{ matrix.environment }}-${{ matrix.engine-version }} | |
path: ./tests/integration/container/reports | |
retention-days: 5 |