@@ -74,6 +74,7 @@ Provider<Task> diff = tasks.register("diff", DefaultTask) { task ->
7474}
7575
7676List<String > diffCoordinates = new ArrayList<> ()
77+ boolean testAll = false
7778if (project. hasProperty(" baseCommit" )) {
7879 String baseCommit = project. findProperty(" baseCommit" )
7980 String newCommit = Objects . requireNonNullElse(project. findProperty(" newCommit" ), " HEAD" )
@@ -87,6 +88,8 @@ if (project.hasProperty("baseCommit")) {
8788 dependsOn(taskTaskName)
8889 }
8990 }
91+
92+ testAll = tck. shouldTestAll()
9093}
9194
9295def matrixDefault = [
@@ -136,13 +139,22 @@ Provider<Task> generateMatrixDiffCoordinates = tasks.register("generateMatrixDif
136139 ]
137140
138141 matrix. putAll(matrixDefault)
142+
139143 /**
140- * when we are introducing a new metadata, we should test it against all versions,
141- * not just the oldest and the newest one (which we are testing by default)
144+ * if we changed some files from tck-build-logic or github workflows, we must run all tests
145+ * to check if we accidentally broke something. In this case, we will have a lots of tests, so we can't
146+ * run them with all possible JDK versions, because we will hit the following error:
147+ * Strategy expansion exceeded 256 results for job 'test-changed-metadata'
142148 */
143- matrix. version. add(" 21" )
144- matrix. version. add(" 22" )
145- matrix. version. add(" dev" )
149+ if (! testAll) {
150+ /**
151+ * when we are introducing a new metadata, we should test it against all versions,
152+ * not just the oldest and the newest one (which we are testing by default)
153+ */
154+ matrix. version. add(" 21" )
155+ matrix. version. add(" 22" )
156+ matrix. version. add(" dev" )
157+ }
146158 println " ::set-output name=matrix::${ JsonOutput.toJson(matrix)} "
147159 println " ::set-output name=none-found::false"
148160 }
0 commit comments