Gradle latest versions tests #113
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Gradle latest versions tests | |
on: | |
schedule: | |
- cron: "0 7 * * MON" | |
workflow_dispatch: | |
jobs: | |
gradle-compatTest: | |
name: "Compatibility tests with latest Gradle versions" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: 11 | |
distribution: 'zulu' | |
- uses: gradle/actions/setup-gradle@v4 | |
- name: Fetch latest available Gradle versions | |
run: | | |
GRADLE_VERSIONS_TYPES_TO_FETCH="current release-candidate nightly release-nightly" | |
GRADLE_VERSIONS_OUTPUT_FILE=latest-gradle-versions.txt | |
for gv in $GRADLE_VERSIONS_TYPES_TO_FETCH; do | |
echo "Fetching latest Gradle version for '$gv'" | |
curl --silent --show-error "https://services.gradle.org/versions/$gv" | jq -r '.version | select( . != null )' >> latest-gradle-versions.txt | |
done | |
echo -e "\nGradle versions configured for compatibility tests (in $GRADLE_VERSIONS_OUTPUT_FILE):" | |
cat $GRADLE_VERSIONS_OUTPUT_FILE | |
echo "GRADLE_VERSIONS_OUTPUT_FILE=$GRADLE_VERSIONS_OUTPUT_FILE" >> $GITHUB_ENV | |
- name: Set latest Gradle versions to test with | |
run: | | |
echo "java11=$(cat ${{ env.GRADLE_VERSIONS_OUTPUT_FILE }} | tr '\n' ',')" > stutter.lockfile | |
echo "Gradle versions configured for compatibility tests:" | |
cat stutter.lockfile | |
- name: Run compatTest | |
run: ./gradlew --continue test compatTest |