File tree Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -59,15 +59,23 @@ jobs:
5959 env :
6060 JOB_TYPE : test
6161 windows :
62+ # Building using Java 11 and run the tests with Java 8 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
6768 - uses : actions/setup-java@v4
6869 with :
69- distribution : temurin
7070 java-version : 8
71+ distribution : temurin
72+ - name : " Set jvm system property environment variable for surefire plugin (unit tests)"
73+ run : echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}\bin\java" >> $GITHUB_ENV
74+ shell : bash
75+ - uses : actions/setup-java@v4
76+ with :
77+ distribution : temurin
78+ java-version : 11
7179 - run : java -version
7280 - run : .kokoro/build.bat
7381 env :
Original file line number Diff line number Diff line change @@ -61,6 +61,18 @@ javadoc)
6161 RETURN_CODE=$?
6262 ;;
6363integration)
64+ # Kokoro integration tests use both JDK 11 and JDK 8. Integration
65+ # tests require JDK 11 export as JAVA env variable to run cloud datastore
66+ # emulator (https://cloud.google.com/sdk/docs/release-notes#39300_2022-07-12).
67+ # For Java 8 environment, we will still run the tests using Java 8 with
68+ # SUREFIRE_JVM_OPT for Maven surefire plugin:
69+ # https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#jvm
70+ if [[ -n " ${JAVA11_HOME} " && -n " ${JAVA8_HOME} " ]]
71+ then
72+ export JAVA=${JAVA11_HOME} /bin/java
73+ export SUREFIRE_JVM_OPT=-Djvm=${JAVA8_HOME} /bin/java
74+ fi
75+
6476 mvn -B ${INTEGRATION_TEST_ARGS} \
6577 -ntp \
6678 -Penable-integration-tests \
Original file line number Diff line number Diff line change 4646
4747s .remove_staging_dirs ()
4848java .common_templates (excludes = [
49+ '.kokoro/build.sh' ,
4950 '.kokoro/presubmit/integration.cfg' ,
5051 '.kokoro/presubmit/graalvm-native.cfg' ,
5152 '.kokoro/presubmit/graalvm-native-17.cfg' ,
5253 '.kokoro/nightly/integration.cfg' ,
5354 '.kokoro/nightly/java11-integration.cfg' ,
5455 '.kokoro/requirements.in' ,
5556 '.kokoro/requirements.txt' ,
56- '.github/dependabot.yml'
57+ '.github/dependabot.yml' ,
58+ '.github/workflows/ci.yaml'
5759])
You can’t perform that action at this time.
0 commit comments