@@ -12,14 +12,13 @@ permissions:
1212 contents : read # This is required for actions/checkout
1313
1414jobs :
15- build -integration-tests :
16- name : Run Integration Tests
15+ lts -integration-tests :
16+ name : Run LTS Integration Tests
1717 runs-on : ubuntu-latest
1818 strategy :
1919 fail-fast : false
2020 matrix :
2121 python-version : [ "3.8", "3.11" ]
22- engine-version : [ "lts", "latest"]
2322 environment : ["mysql", "pg"]
2423
2524 steps :
@@ -49,19 +48,73 @@ jobs:
4948 role-duration-seconds : 21600
5049 aws-region : ${{ secrets.AWS_DEFAULT_REGION }}
5150
52- - name : ' Run Integration Tests'
51+ - name : ' Run LTS Integration Tests'
5352 run : |
5453 ./gradlew --no-parallel --no-daemon test-python-${{ matrix.python-version }}-${{ matrix.environment }} --info
5554 env :
5655 RDS_CLUSTER_DOMAIN : ${{ secrets.DB_CONN_SUFFIX }}
5756 RDS_DB_REGION : ${{ secrets.AWS_DEFAULT_REGION }}
58- AURORA_MYSQL_DB_ENGINE_VERSION : ${{ matrix.engine-version }}
59- AURORA_PG_ENGINE_VERSION : ${{ matrix.engine-version }}
57+ AURORA_MYSQL_DB_ENGINE_VERSION : lts
58+ AURORA_PG_ENGINE_VERSION : lts
6059
61- - name : ' Archive results'
60+ - name : ' Archive LTS results'
6261 if : always()
6362 uses : actions/upload-artifact@v4
6463 with :
65- name : pytest-integration-report-${{ matrix.python-version }}-${{ matrix.environment }}-${{ matrix.engine-version }}
64+ name : pytest-integration-report-${{ matrix.python-version }}-${{ matrix.environment }}-lts
65+ path : ./tests/integration/container/reports
66+ retention-days : 5
67+
68+ latest-integration-tests :
69+ name : Run Latest Integration Tests
70+ runs-on : ubuntu-latest
71+ needs : lts-integration-tests
72+ strategy :
73+ fail-fast : false
74+ matrix :
75+ python-version : [ "3.8", "3.11" ]
76+ environment : ["mysql", "pg"]
77+
78+ steps :
79+ - name : ' Clone repository'
80+ uses : actions/checkout@v4
81+
82+ - name : ' Set up JDK 8'
83+ uses : actions/setup-java@v4
84+ with :
85+ distribution : ' corretto'
86+ java-version : 8
87+
88+ - name : Install poetry
89+ shell : bash
90+ run : |
91+ pipx install poetry==1.8.2
92+ poetry config virtualenvs.prefer-active-python true
93+
94+ - name : Install dependencies
95+ run : poetry install
96+
97+ - name : ' Configure AWS Credentials'
98+ uses : aws-actions/configure-aws-credentials@v4
99+ with :
100+ role-to-assume : arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/${{ secrets.AWS_DEPLOY_ROLE }}
101+ role-session-name : python_integration_tests
102+ role-duration-seconds : 21600
103+ aws-region : ${{ secrets.AWS_DEFAULT_REGION }}
104+
105+ - name : ' Run Latest Integration Tests'
106+ run : |
107+ ./gradlew --no-parallel --no-daemon test-python-${{ matrix.python-version }}-${{ matrix.environment }} --info
108+ env :
109+ RDS_CLUSTER_DOMAIN : ${{ secrets.DB_CONN_SUFFIX }}
110+ RDS_DB_REGION : ${{ secrets.AWS_DEFAULT_REGION }}
111+ AURORA_MYSQL_DB_ENGINE_VERSION : latest
112+ AURORA_PG_ENGINE_VERSION : latest
113+
114+ - name : ' Archive Latest results'
115+ if : always()
116+ uses : actions/upload-artifact@v4
117+ with :
118+ name : pytest-integration-report-${{ matrix.python-version }}-${{ matrix.environment }}-latest
66119 path : ./tests/integration/container/reports
67120 retention-days : 5
0 commit comments