Skip to content

Commit

Permalink
Remove redudant test executions for maven plugin caused by multiple g…
Browse files Browse the repository at this point in the history
…radle versions
  • Loading branch information
dnestoro committed Oct 9, 2023
1 parent e312098 commit d10ad62
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test-native-gradle-plugin.yml
Expand Up @@ -99,6 +99,7 @@ jobs:
with:
name: functional-tests-results-graalvm-dev
path: native-gradle-plugin/build/reports/tests/functionalTest/

functional-testing-gradle-plugin:
name: "🧪 Gradle: ${{ matrix.test }} on ${{ matrix.os }} with gradle version: ${{ matrix.gradle-version }}"
runs-on: ${{ matrix.os }}
Expand All @@ -124,6 +125,7 @@ jobs:
with:
name: functional-tests-results-${{ matrix.gradle-version }}
path: native-gradle-plugin/build/reports/tests/functionalTest/

functional-testing-gradle-plugin-windows:
name: "Windows Gradle plugin functional testing"
if: ${{ false }}
Expand Down
@@ -1,23 +1,33 @@
import groovy.json.JsonOutput

import java.nio.file.Files

def matrixDefault = [
"gradle-version": ["current", "7.4"],
"gradle-config-cache-version": ["current", "8.0.1"],
// # Following versions are disabled temporarily in order to speed up PR testing "7.3.3", "7.2", "7.1", "6.8.3",
"java-version": [ "17" ],
"os": [ "ubuntu-20.04" ]
]

def gradleVersions = [
"gradle-version": ["current", "7.4"],
"gradle-config-cache-version": ["current", "8.0.1"]
// # Following versions are disabled temporarily in order to speed up PR testing "7.3.3", "7.2", "7.1", "6.8.3",
]

sourceSets.configureEach { sourceSet ->
if (sourceSet.name == 'functionalTest') {
tasks.register("dumpFunctionalTestList") {
doLast {
def matrix = [
test: []
]

// add all defaults
matrix.putAll(matrixDefault)

// add gradle specific stuff
if (project.getDisplayName().contains(":native-gradle-plugin")) {
matrix.putAll(gradleVersions)
}

// add functional tests
sourceSet.allSource.each {
matrix.test << it.name.substring(0, it.name.lastIndexOf('.'))
}
Expand Down

0 comments on commit d10ad62

Please sign in to comment.