Skip to content

Commit 00c0d21

Browse files
committed
Fix ci testing environment with java 11
1 parent 765f311 commit 00c0d21

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,21 @@ jobs:
5959
env:
6060
JOB_TYPE: test
6161
windows:
62+
# Building using Java 8 and run the tests with Java 11 runtime
6263
runs-on: windows-latest
6364
steps:
6465
- name: Support longpaths
6566
run: git config --system core.longpaths true
6667
- uses: actions/checkout@v4
68+
- uses: actions/setup-java@v4
69+
with:
70+
java-version: 11
71+
distribution: temurin
72+
- name: "Set jvm system property environment variable for surefire plugin (unit tests)"
73+
# Maven surefire plugin (unit tests) allows us to specify JVM to run the tests.
74+
# https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#jvm
75+
run: echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}/bin/java" >> $GITHUB_ENV
76+
shell: bash
6777
- uses: actions/setup-java@v4
6878
with:
6979
distribution: temurin

0 commit comments

Comments
 (0)