Skip to content

ci: extend Java testing with 17 & 21 with py3.12 - #79

Merged
ptoscano merged 1 commit into
ansible:mainfrom
ptoscano:ci-java-matrix
Jun 22, 2026
Merged

ptoscano merged 1 commit into
ansible:mainfrom
ptoscano:ci-java-matrix

Conversation

@ptoscano

@ptoscano ptoscano commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Make it possible to test multiple versions of Java rather than only 18. To avoid testing every Java version with every Python version, only Python 3.12 is used for testing different Java versions, keeping only 18 for other Python versions.

Also add:

  • Java 17: the LTS currently in use by ansible-rulebook
  • Java 21: supported by drools-ansible-integration

Summary by CodeRabbit

Summary by CodeRabbit

  • Chores
    • Expanded the CI test matrix to run against additional Java versions, with a default Java 18 configuration and extra combinations alongside Python 3.12.
    • Updated the Java setup process to use the selected matrix Java version, improving consistency across CI runs.

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The CI workflow matrix gains a java-version dimension defaulting to Java 18, with an include override that pairs Python 3.12 with Java 17. The setup-java step is updated to reference matrix.java-version instead of a hard-coded value.

Changes

CI Matrix Java Version Update

Layer / File(s) Summary
Matrix definition and setup-java step
.github/workflows/python_package.yml
Adds java-version: 18 as a matrix default and an include entry that pairs Python 3.12 with Java 17. The setup-java step name and java-version input are updated to reference ${{ matrix.java-version }} instead of a fixed value.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: extending Java testing to include versions 17 and 21 with Python 3.12, matching the PR's objective to expand CI coverage.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/python_package.yml:
- Around line 21-22: The checkout action in the workflow is missing the
persist-credentials parameter, which leaves the authentication token in the git
config and creates a security vulnerability. Add the persist-credentials: false
parameter to the actions/checkout@v6 step to ensure the authentication token is
not persisted in the git configuration after the checkout completes.
- Around line 21-24: Replace all mutable action version tags with full commit
SHAs to improve CI supply-chain security. Update the actions/checkout reference
from `@v6` to its corresponding full commit SHA, the actions/setup-java reference
from `@v5` to its corresponding full commit SHA, and also update the other
instances using `@v6` on line 29 and `@v7` on line 50 to their respective full
commit SHAs. Use the format uses:
action-name@SHA256:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX for each action
reference throughout the workflow file.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 19b012f1-2aa1-4d54-a6ec-4deb61d80b01

📥 Commits

Reviewing files that changed from the base of the PR and between 0c804da and 5aa716c.

📒 Files selected for processing (1)
  • .github/workflows/python_package.yml

Comment thread .github/workflows/python_package.yml Outdated
Comment thread .github/workflows/python_package.yml

@tkobayas tkobayas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Comment thread .github/workflows/python_package.yml
Comment thread .github/workflows/python_package.yml
@ptoscano ptoscano changed the title ci: extend Java testing with 17 with py3.12 ci: extend Java testing with 17 & 21 with py3.12 Jun 18, 2026
Make it possible to test multiple versions of Java rather than only 18.
To avoid testing every Java version with every Python version, only
Python 3.12 is used for testing different Java versions, keeping only 18
for other Python versions.

Also add:
- Java 17: the LTS currently in use by ansible-rulebook
- Java 21: supported by drools-ansible-integration
@ptoscano
ptoscano merged commit fa25c1d into ansible:main Jun 22, 2026
8 checks passed
@ptoscano
ptoscano deleted the ci-java-matrix branch June 22, 2026 17:31
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants