Skip to content

Commit 13056a7

Browse files
Use explicit mavenLocal env var for standalone integration tests (#22)
This PR fixes an issue with the publish workflow, where it tries to build the integration tests using the released version number which has not been published yet. In #11 and #16 I made changes to allow the integration tests to run as a standalone Gradle project. This is necessary for the matrix testing which tests the integration tests against a number of different JVM versions. Unfortunately the approach here is not completely compatible with the release workflow, since the `PROJECT_VERSION` variable is set there and the workflow attempts to build the integration tests against a `.jar` file which has not yet been published. To fix this, I've split the intent configuration from the version configuration. Now the `USE_MAVEN_LOCAL` variable indicates that a standalone build should take place, and `PROJECT_VERSION` is used to configure the `.jar` file to look for as well as to configure the version number for the project build. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
1 parent fe5009f commit 13056a7

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/java-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ jobs:
153153
- name: Run integration tests
154154
working-directory: integration-tests
155155
env:
156+
USE_MAVEN_LOCAL: "true"
156157
PROJECT_VERSION: 0.0.0-SNAPSHOT
157158
REGION: ${{ secrets.AURORA_DSQL_INTEGRATION_CLUSTER_REGION }}
158159
CLUSTER_ENDPOINT: ${{ needs.create-cluster.outputs.cluster-id }}.dsql.${{ secrets.AURORA_DSQL_INTEGRATION_CLUSTER_REGION }}.on.aws

integration-tests/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repositories {
1212

1313
dependencies {
1414
// Allow subproject to build standalone if the dependency is published in mavenLocal.
15-
if (System.getenv("PROJECT_VERSION") != null) {
15+
if (System.getenv("USE_MAVEN_LOCAL") != null) {
1616
testImplementation("software.amazon.dsql:aurora-dsql-jdbc-connector:${System.getenv("PROJECT_VERSION")}")
1717
} else {
1818
testImplementation(project(":"))

0 commit comments

Comments
 (0)