Refactor Groovy version detection to use custom exception #539
Workflow file for this run
This file contains hidden or 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: GitHub CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| env: | |
| MAVEN_OPTS: '-Xms2048m -Xmx2048m' | |
| MAVEN_ARGS: >- | |
| --show-version | |
| --errors | |
| --batch-mode | |
| --no-transfer-progress | |
| -Dinvoker.streamLogsOnFailures=true | |
| -Dgpg.skip=true | |
| defaults: | |
| run: | |
| shell: 'bash -o errexit -o nounset -o pipefail {0}' | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| groovy-version: | |
| - 2.5.23 | |
| - 3.0.25 | |
| - 4.0.29 | |
| - 5.0.3 | |
| env: | |
| MVN_GROOVY_GROUP_ID: ${{format('{0}{1}', '-DgroovyVersion=', matrix.groovy-version)}} | |
| MVN_GROOVY_VERSION: ${{(startsWith(matrix.groovy-version, '2') || startsWith(matrix.groovy-version, '3')) && '-DgroovyGroupId=org.codehaus.groovy' || '-DgroovyGroupId=org.apache.groovy'}} | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| - name: jdk setup | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: temurin | |
| java-version: | | |
| 17 | |
| 21 | |
| - name: full test | |
| run: | | |
| ./mvnw org.apache.maven.plugins:maven-toolchains-plugin:generate-jdk-toolchains-xml -Dtoolchain.file=src/it/toolchains.xml | |
| ./mvnw ${MAVEN_ARGS} --global-toolchains src/it/toolchains.xml ${MVN_GROOVY_GROUP_ID} ${MVN_GROOVY_VERSION} clean install invoker:install invoker:run |