Skip to content

Commit

Permalink
Cron tests with latest Gradle version(s) on CI (#174)
Browse files Browse the repository at this point in the history
* Cron tests with latest Gradle version(s)

To faster detect regressions, deprecations and incompatibilities.

* Wording

* Wording

* Separate fetching latest versions and setting it for tests

The fetching step could be extracted to separate GH action.

* Allow for manual Gradle latest versions tests workflow trigger

* Add merge_group for main workflow

Also removed "yaml-language-server", schema could be enforced in used editors.

* Remove technical push rule for current MR branch
  • Loading branch information
szpak authored Feb 19, 2023
1 parent 3dae00e commit 54dff4e
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ max_line_length = off
trim_trailing_whitespace = true
# Trailing comma language feature requires Kotlin plugin 1.4+, at the moment the compilation is done with Kotlin 1.3.
# This helps IDEA to format the code properly, see also spotless { } in build.gradle.kts.
ij_kotlin_allow_trailing_comma = false # Only used for declaration site
ij_kotlin_allow_trailing_comma = false # Only used for declaration site
ij_kotlin_allow_trailing_comma_on_call_site = false

[*.bat]
end_of_line = crlf

[*.yml]
indent_size = 2
41 changes: 41 additions & 0 deletions .github/workflows/gradle-latest-versions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
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@v3
- uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'zulu'

- 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: |
cp "${{ env.GRADLE_VERSIONS_OUTPUT_FILE }}" .stutter/java11.lock
echo "Gradle versions configured for compatibility tests:"
cat .stutter/java11.lock
- name: Run compatTest
run: ./gradlew --continue test compatTest
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
pull_request:
branches:
- '*'
merge_group:

jobs:
gradle:
Expand Down

0 comments on commit 54dff4e

Please sign in to comment.