Skip to content

Commit cdb81be

Browse files
committed
chore: manual fixes for java-spanner-jdbc
1 parent 1981dad commit cdb81be

9 files changed

+26
-17
lines changed

.github/workflows/java-spanner-jdbc-ci.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ jobs:
129129
runs-on: ubuntu-latest
130130
steps:
131131
- uses: actions/checkout@v4
132+
with:
133+
fetch-depth: 0
132134
- uses: actions/setup-java@v4
133135
with:
134136
distribution: temurin
@@ -137,3 +139,5 @@ jobs:
137139
- run: .kokoro/build.sh
138140
env:
139141
JOB_TYPE: lint
142+
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
143+
BASE_SHA: ${{ github.event.pull_request.base.sha }}

.github/workflows/java-spanner-jdbc-integration-tests-against-emulator.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
filters: |
2020
library:
2121
- 'java-spanner-jdbc/**'
22-
units:
22+
tests-against-emulator:
2323
needs: filter
2424
if: ${{ needs.filter.outputs.library == 'true' }}
2525
runs-on: ubuntu-latest
@@ -36,11 +36,14 @@ jobs:
3636
- uses: actions/setup-java@v5
3737
with:
3838
distribution: temurin
39-
java-version: 8
39+
java-version: 17
4040
- run: java -version
41-
- run: .kokoro/build.sh
42-
- run: mvn -B -Dspanner.testenv.instance="" -Penable-integration-tests -DtrimStackTrace=false -Dclirr.skip=true -Denforcer.skip=true -fae verify
41+
- name: Install dependencies for the integration test
42+
run: .kokoro/build.sh
4343
env:
4444
JOB_TYPE: test
45+
- run: mvn -B -Dspanner.testenv.instance="" -Penable-integration-tests -DtrimStackTrace=false -Dclirr.skip=true -Denforcer.skip=true -fae verify
46+
working-directory: java-spanner-jdbc
47+
env:
4548
SPANNER_EMULATOR_HOST: localhost:9010
4649
GOOGLE_CLOUD_PROJECT: emulator-test-project

.github/workflows/java-spanner-jdbc-quickperf.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ jobs:
4343
java-version: 17
4444
- name: Run tests
4545
run: mvn test
46-
working-directory: samples/quickperf
46+
working-directory: java-spanner-jdbc/samples/quickperf

.github/workflows/java-spanner-jdbc-sample-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ jobs:
4343
java-version: 8
4444
- name: Run sample tests
4545
run: mvn --quiet --batch-mode test
46-
working-directory: samples/snippets
46+
working-directory: java-spanner-jdbc/samples/snippets

.github/workflows/java-spanner-jdbc-spring-data-jdbc-sample.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
java-version: 17
4444
- name: Run tests on GoogleSQL
4545
run: mvn test
46-
working-directory: samples/spring-data-jdbc/googlesql
46+
working-directory: java-spanner-jdbc/samples/spring-data-jdbc/googlesql
4747
- name: Run tests on PostgreSQL
4848
run: mvn test
49-
working-directory: samples/spring-data-jdbc/postgresql
49+
working-directory: java-spanner-jdbc/samples/spring-data-jdbc/postgresql

.github/workflows/java-spanner-jdbc-spring-data-mybatis-sample.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
java-version: 17
4444
- name: Run GoogleSQL sample tests
4545
run: mvn test
46-
working-directory: samples/spring-data-mybatis/googlesql
46+
working-directory: java-spanner-jdbc/samples/spring-data-mybatis/googlesql
4747
- name: Run PostgreSQL sample tests
4848
run: mvn test
49-
working-directory: samples/spring-data-mybatis/postgresql
49+
working-directory: java-spanner-jdbc/samples/spring-data-mybatis/postgresql

.kokoro/presubmit/spanner-jdbc-integration.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Configure the docker image for kokoro-trampoline.
44
env_vars: {
55
key: "TRAMPOLINE_IMAGE"
6-
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java11"
77
}
88

99
env_vars: {

java-spanner-jdbc/pom.xml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,13 +207,13 @@
207207
<dependency>
208208
<groupId>com.google.cloud</groupId>
209209
<artifactId>google-cloud-trace</artifactId>
210-
<version>2.87.0</version><!-- {x-version-update:google-cloud-trace:current} -->
210+
<version>2.89.0-SNAPSHOT</version><!-- {x-version-update:google-cloud-trace:current} -->
211211
<scope>test</scope>
212212
</dependency>
213213
<dependency>
214214
<groupId>com.google.api.grpc</groupId>
215215
<artifactId>proto-google-cloud-trace-v1</artifactId>
216-
<version>2.87.0</version><!-- {x-version-update:proto-google-cloud-trace-v1:current} -->
216+
<version>2.89.0-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-trace-v1:current} -->
217217
<scope>test</scope>
218218
</dependency>
219219

@@ -345,10 +345,12 @@
345345
</goals>
346346
<configuration>
347347
<mainClass>com.google.cloud.spanner.jdbc.ConnectionPropertiesFileGenerator</mainClass>
348+
<arguments>
349+
<argument>${project.basedir}/documentation/connection_properties.md</argument>
350+
</arguments>
348351
<classpathScope>test</classpathScope>
349352
<skip>false</skip>
350-
</configuration>
351-
</execution>
353+
</configuration> </execution>
352354
</executions>
353355
</plugin>
354356
</plugins>

java-spanner-jdbc/src/test/java/com/google/cloud/spanner/jdbc/ConnectionPropertiesFileGenerator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
public class ConnectionPropertiesFileGenerator {
2929

3030
public static void main(String[] args) throws IOException {
31+
String filename = args.length > 0 ? args[0] : "documentation/connection_properties.md";
3132
StringBuilder builder =
3233
new StringBuilder("# Supported Connection Properties\n\n")
3334
.append(
@@ -57,8 +58,7 @@ public static void main(String[] args) throws IOException {
5758
.append(connectionProperty.getContext())
5859
.append(" |\n");
5960
}
60-
try (BufferedWriter writer =
61-
new BufferedWriter(new FileWriter("documentation/connection_properties.md"))) {
61+
try (BufferedWriter writer = new BufferedWriter(new FileWriter(filename))) {
6262
writer.write(builder.toString());
6363
}
6464
}

0 commit comments

Comments
 (0)