Skip to content
This repository was archived by the owner on Feb 21, 2025. It is now read-only.

Commit 2b6d7e8

Browse files
committed
Test detection of JDK 21
1 parent c4fd64f commit 2b6d7e8

File tree

1 file changed

+1
-31
lines changed

1 file changed

+1
-31
lines changed

.github/workflows/integ-test-detect-java-toolchains.yml

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
grep -q 'Eclipse Temurin JDK 1.8' output.txt || (echo "::error::Did not detect preinstalled JDK 1.8" && exit 1)
4545
grep -q 'Eclipse Temurin JDK 11' output.txt || (echo "::error::Did not detect preinstalled JDK 11" && exit 1)
4646
grep -q 'Eclipse Temurin JDK 17' output.txt || (echo "::error::Did not detect preinstalled JDK 17" && exit 1)
47+
grep -q 'Eclipse Temurin JDK 12' output.txt || (echo "::error::Did not detect preinstalled JDK 21" && exit 1)
4748
4849
# Test that JDKs provisioned by setup-java are detected
4950
setup-java-installed-toolchain:
@@ -80,34 +81,3 @@ jobs:
8081
run: |
8182
grep -q 'Eclipse Temurin JDK 16' output.txt || (echo "::error::Did not detect setup-java installed JDK 16" && exit 1)
8283
grep -q 'Eclipse Temurin JDK 20' output.txt || (echo "::error::Did not detect setup-java installed JDK 20" && exit 1)
83-
84-
# Test that predefined JDK detection property is not overwritten by action
85-
check-no-overwrite:
86-
strategy:
87-
matrix:
88-
os: ${{fromJSON(inputs.runner-os)}}
89-
runs-on: ${{ matrix.os }}
90-
steps:
91-
- name: Checkout sources
92-
uses: actions/checkout@v4
93-
- name: Download distribution if required
94-
uses: ./.github/actions/download-dist
95-
- name: Configure java installations env var in Gradle User Home
96-
shell: bash
97-
run: |
98-
mkdir -p ~/.gradle
99-
echo "org.gradle.java.installations.fromEnv=XXXXX" > ~/.gradle/gradle.properties
100-
- name: Setup Gradle
101-
uses: ./
102-
- name: Check gradle.properties
103-
shell: bash
104-
run: |
105-
cat ~/.gradle/gradle.properties
106-
if grep -q 'org.gradle.java.installations.fromEnv=JAVA_HOME' ~/.gradle/gradle.properties ; then
107-
echo 'Found overwritten fromEnv'
108-
exit 1
109-
fi
110-
if ! grep -q 'org.gradle.java.installations.fromEnv=XXXXX' ~/.gradle/gradle.properties ; then
111-
echo 'Did NOT find original fromEnv'
112-
exit 1
113-
fi

0 commit comments

Comments
 (0)