-
Notifications
You must be signed in to change notification settings - Fork 829
Add test matrix for different java versions #1781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 31 commits
3f2e73b
c709cc7
0cdbb3b
8472199
4d19fd7
18763cb
4bcc776
58e0b20
69f7901
36ed925
ce39d7a
1f49ac5
61df78b
2b2bbf5
1df9c69
4d1f6a3
5e4bfdf
690824f
16d922a
fe0f06a
780752c
beadc0a
2b45c09
e5c129e
ae836bf
c972680
c6b6d5a
efc9c9f
9548485
501afb0
7b3a748
e887c64
cd80efc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| --- | ||
| name: Java-Version Compatibility Tests | ||
|
|
||
| on: [pull_request] | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| compatibility-test: | ||
| name: Test on Java ${{ matrix.java }} | ||
| runs-on: ubuntu-24.04 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| java: [17, 21, 25] | ||
| steps: | ||
| - name: Check out | ||
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up Java ${{ matrix.java }} | ||
| id: setup-java | ||
| uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5 | ||
|
jaydeluca marked this conversation as resolved.
Outdated
|
||
| with: | ||
| distribution: "temurin" | ||
| java-version: ${{ matrix.java }} | ||
|
|
||
| - name: Cache local Maven repository | ||
| uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2 | ||
| with: | ||
| path: ~/.m2/repository | ||
| key: ${{ runner.os }}-maven-java${{ matrix.java }}-${{ hashFiles('**/pom.xml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-maven-java${{ matrix.java }}- | ||
| ${{ runner.os }}-maven- | ||
|
|
||
| - name: Build and test on Java ${{ matrix.java }} | ||
| run: ./mvnw clean install -Dtest.java.version=${{ matrix.java }} -Dspotless.skip=true -Dcheckstyle.skip=true -Dwarnings=-nowarn -Dcoverage.skip=true | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,4 +9,4 @@ set -euo pipefail | |
| VERSION=${usage_tag#v} | ||
|
|
||
| mise run set-version "$VERSION" | ||
| mvn -B package -P 'release,!default' -Dmaven.test.skip=true | ||
| mvn -B package -P 'release,!default,!examples-and-integration-tests' -Dmaven.test.skip=true -Dgpg.skip=true | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why is this needed?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. adding the profiles has added some issues to the way some of these other tasks resolve everything. from: the shaded module's tests need a test-jar dependency that's explicitly excluded from the release profile, so thats why i added the I was also encountering gpg issues both in CI and locally, not sure if this is a "me" thing, but didn't think it was necessary for this test step
jaydeluca marked this conversation as resolved.
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not 8, 11?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i couldnt get them to work, can't remember why, let me try again to refresh my memory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
theres a bunch of test code that uses switch statements and """...""" text blocks. I can refactor them all if we think it's worth it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, JUnit Jupiter 6.0.2 requires Java 17+ to run
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ive put a lot of effort into getting this to work for 8 and 11, and it's becoming a massive messy change. and adds a ton of complexity to the pom files. I propose that we keep the scope of this PR to what it is now, running the tests on 17+, and i can open an issue to track a followup where instead of running our entire test suite on every java version, we create some smoke tests that are more multi-version friendly in terms of dependencies etc, and then we can run that across 8 and 11 as well