Skip to content

Commit

Permalink
Merge pull request #269 from groovy/test-only-supported-versions
Browse files Browse the repository at this point in the history
Test only supported Groovy versions and automate their testing
  • Loading branch information
keeganwitt committed Sep 25, 2023
2 parents f38d734 + 981d4e7 commit 0fa9649
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 96 deletions.
41 changes: 32 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,44 @@ on:
branches:
- master

env:
MAVEN_OPTS: '-Xms2048m -Xmx2048m'
MAVEN_ARGS: >-
--show-version
--errors
--batch-mode
--no-transfer-progress
-Dinvoker.streamLogsOnFailures=true
-Pnonindy
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.19
- 4.0.15
# - 5.0.0-alpha-2
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@v2
uses: actions/checkout@v4
- name: jdk setup
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
java-package: jdk
architecture: x64
# - name: unit test
# run: ./mvnw --batch-mode --activate-profiles indy clean test
# - name: integration test
# run: ./mvnw --batch-mode --activate-profiles indy -Dmaven.test.skip=true clean install invoker:install invoker:run
- name: full test
run: ./mvnw --batch-mode clean install invoker:install invoker:run
run: >-
./mvnw ${MAVEN_ARGS}
${MVN_GROOVY_GROUP_ID}
${MVN_GROOVY_VERSION}
clean install invoker:install invoker:run
81 changes: 0 additions & 81 deletions integrationTestSuite.groovy

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,6 @@ public abstract class AbstractGenerateStubsMojo extends AbstractGroovyStubSource
*/
protected static final Version GROOVY_1_8_3 = new Version(1, 8, 3);

/*
* TODO: support Groovy 1.5.0 - 1.8.1?
* For some reason, the JavaStubCompilationUnit is silently not creating my stubs
* (although it does create the target directory) when I use other versions.
*/

/**
* The encoding of source files.
*/
Expand Down

0 comments on commit 0fa9649

Please sign in to comment.