mirror of
https://github.com/gradle/gradle-build-action.git
synced 2024-12-25 01:36:19 +08:00
Test execution with older Gradle versions
This commit is contained in:
parent
b650771559
commit
9b7c81f8f6
41
.github/workflows/integTest-execution.yml
vendored
41
.github/workflows/integTest-execution.yml
vendored
@ -40,3 +40,44 @@ jobs:
|
||||
gradle-executable: __tests__/samples/groovy-dsl/gradlew${{ matrix.script-suffix }}
|
||||
build-root-directory: __tests__/samples/no-wrapper
|
||||
arguments: help -DgradleVersionCheck=7.1.1
|
||||
|
||||
gradle-versions:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
include:
|
||||
- os: windows-latest
|
||||
script-suffix: '.bat'
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v2
|
||||
- name: Test Gradle 7
|
||||
uses: ./
|
||||
id: gradle7
|
||||
with:
|
||||
gradle-version: 7.2
|
||||
build-root-directory: __tests__/samples/no-wrapper
|
||||
arguments: help -DgradleVersionCheck=7.2
|
||||
- name: Test Gradle 6
|
||||
uses: ./
|
||||
id: gradle6
|
||||
with:
|
||||
gradle-version: 6.9
|
||||
build-root-directory: __tests__/samples/no-wrapper
|
||||
arguments: help -DgradleVersionCheck=6.9
|
||||
- name: Test Gradle 5
|
||||
uses: ./
|
||||
id: gradle5
|
||||
with:
|
||||
gradle-version: 5.6.4
|
||||
build-root-directory: __tests__/samples/no-wrapper-gradle-5
|
||||
arguments: help -DgradleVersionCheck=5.6.4
|
||||
- name: Test Gradle 4
|
||||
uses: ./
|
||||
id: gradle4
|
||||
with:
|
||||
gradle-version: 4.10.3
|
||||
build-root-directory: __tests__/samples/no-wrapper-gradle-4
|
||||
arguments: help -DgradleVersionCheck=4.10.3
|
||||
|
10
__tests__/samples/no-wrapper-gradle-4/build.gradle
Normal file
10
__tests__/samples/no-wrapper-gradle-4/build.gradle
Normal file
@ -0,0 +1,10 @@
|
||||
plugins {
|
||||
id "com.gradle.build-scan" version "1.16"
|
||||
}
|
||||
|
||||
buildScan {
|
||||
termsOfServiceUrl = "https://gradle.com/terms-of-service"
|
||||
termsOfServiceAgree = "yes"
|
||||
publishAlways()
|
||||
}
|
||||
|
8
__tests__/samples/no-wrapper-gradle-4/settings.gradle
Normal file
8
__tests__/samples/no-wrapper-gradle-4/settings.gradle
Normal file
@ -0,0 +1,8 @@
|
||||
rootProject.name = 'no-wrapper'
|
||||
|
||||
println "Using Gradle version: ${gradle.gradleVersion}"
|
||||
|
||||
def gradleVersionCheck = System.properties.gradleVersionCheck
|
||||
if (gradleVersionCheck && gradle.gradleVersion != gradleVersionCheck) {
|
||||
throw new RuntimeException("Got the wrong version: expected ${gradleVersionCheck} but was ${gradle.gradleVersion}")
|
||||
}
|
12
__tests__/samples/no-wrapper-gradle-5/build.gradle
Normal file
12
__tests__/samples/no-wrapper-gradle-5/build.gradle
Normal file
@ -0,0 +1,12 @@
|
||||
plugins {
|
||||
id("com.gradle.build-scan") version("3.7")
|
||||
}
|
||||
|
||||
gradleEnterprise {
|
||||
buildScan {
|
||||
termsOfServiceUrl = "https://gradle.com/terms-of-service"
|
||||
termsOfServiceAgree = "yes"
|
||||
publishAlways()
|
||||
uploadInBackground = false
|
||||
}
|
||||
}
|
8
__tests__/samples/no-wrapper-gradle-5/settings.gradle
Normal file
8
__tests__/samples/no-wrapper-gradle-5/settings.gradle
Normal file
@ -0,0 +1,8 @@
|
||||
rootProject.name = 'no-wrapper'
|
||||
|
||||
println "Using Gradle version: ${gradle.gradleVersion}"
|
||||
|
||||
def gradleVersionCheck = System.properties.gradleVersionCheck
|
||||
if (gradleVersionCheck && gradle.gradleVersion != gradleVersionCheck) {
|
||||
throw new RuntimeException("Got the wrong version: expected ${gradleVersionCheck} but was ${gradle.gradleVersion}")
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user