From 3c3b42272333ce2a605d98bf69b5745860055b5a Mon Sep 17 00:00:00 2001 From: Ling Bao Date: Wed, 27 May 2026 10:58:42 +1000 Subject: [PATCH 1/3] ci: add Maven verification workflow with JDK 17/21 matrix Adds .github/workflows/maven-ci.yml byte-identical to the Phase 13 cohort canonical workflow (sha256 d28259b5d2cc14b8d4fb6d658676716e1f78 d52207c5935e49a4af6e9f0d5748). Provides parallel JDK 17 + JDK 21 verification matrix (fail-fast: false), executing `mvn -B test` and `mvn -B package` on each axis to validate forward compatibility before any module bytecode floor bump. Workstream: ultikits-maintainability Phase 14 gate: 14-03-ultibot-jdk21-stage-impl --- .github/workflows/maven-ci.yml | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/maven-ci.yml diff --git a/.github/workflows/maven-ci.yml b/.github/workflows/maven-ci.yml new file mode 100644 index 0000000..fb1ee73 --- /dev/null +++ b/.github/workflows/maven-ci.yml @@ -0,0 +1,36 @@ +name: Maven CI + +on: + push: + branches: + - '**' + pull_request: + +permissions: + contents: read + +jobs: + verify: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + java-version: ['17', '21'] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up JDK ${{ matrix.java-version }} + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{ matrix.java-version }} + cache: maven + + - name: Run tests + run: mvn -B test + + - name: Build package + run: mvn -B package From 265f8e87a6283806735e18be746d630552a978ff Mon Sep 17 00:00:00 2001 From: Ling Bao Date: Wed, 27 May 2026 13:43:04 +1000 Subject: [PATCH 2/3] test: fix BotCommandsTest constructor call to 5-arg signature BotCommands ctor was widened 2->5 params (ActionServiceImpl, MacroServiceImpl, SkinService) in d4f961d; this updates the lagging test to mock all five deps and pass them. Unblocks UltiBot CI. Workstream: ultikits-maintainability Gate: 14-04A-ultibot-test-remediation Co-Authored-By: Claude Opus 4.7 (1M context) --- .../plugins/ultibot/commands/BotCommandsTest.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ultibot-core/src/test/java/com/ultikits/plugins/ultibot/commands/BotCommandsTest.java b/ultibot-core/src/test/java/com/ultikits/plugins/ultibot/commands/BotCommandsTest.java index 2880911..883bd99 100644 --- a/ultibot-core/src/test/java/com/ultikits/plugins/ultibot/commands/BotCommandsTest.java +++ b/ultibot-core/src/test/java/com/ultikits/plugins/ultibot/commands/BotCommandsTest.java @@ -2,7 +2,10 @@ import com.ultikits.plugins.ultibot.api.BotPlayer; import com.ultikits.plugins.ultibot.config.BotConfig; +import com.ultikits.plugins.ultibot.service.ActionServiceImpl; import com.ultikits.plugins.ultibot.service.BotManagerImpl; +import com.ultikits.plugins.ultibot.service.MacroServiceImpl; +import com.ultikits.plugins.ultibot.service.SkinService; import com.ultikits.ultitools.abstracts.UltiToolsPlugin; import org.bukkit.Location; import org.bukkit.World; @@ -27,6 +30,9 @@ class BotCommandsTest { @Mock private UltiToolsPlugin plugin; @Mock private BotManagerImpl botManager; + @Mock private ActionServiceImpl actionService; + @Mock private MacroServiceImpl macroService; + @Mock private SkinService skinService; @Mock private Player player; @Mock private World world; @Mock private BotConfig config; @@ -41,7 +47,7 @@ void setUp() { when(player.hasPermission(anyString())).thenReturn(true); when(botManager.getConfig()).thenReturn(config); when(config.getMaxBotsPerPlayer()).thenReturn(5); - commands = new BotCommands(plugin, botManager); + commands = new BotCommands(plugin, botManager, actionService, macroService, skinService); } @Nested From 735c70918596ee629e776a4954c6e72ca7cfb6de Mon Sep 17 00:00:00 2001 From: Ling Bao Date: Wed, 27 May 2026 21:45:17 +1000 Subject: [PATCH 3/3] ci: route UltiBot CI through UltiKits/ci-workflows@v1.0.0 NMS caller --- .github/workflows/maven-ci.yml | 36 +++++++--------------------------- 1 file changed, 7 insertions(+), 29 deletions(-) diff --git a/.github/workflows/maven-ci.yml b/.github/workflows/maven-ci.yml index fb1ee73..bebb590 100644 --- a/.github/workflows/maven-ci.yml +++ b/.github/workflows/maven-ci.yml @@ -1,36 +1,14 @@ name: Maven CI - on: push: - branches: - - '**' + branches: ['**'] pull_request: - permissions: contents: read - jobs: - verify: - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - java-version: ['17', '21'] - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up JDK ${{ matrix.java-version }} - uses: actions/setup-java@v4 - with: - distribution: temurin - java-version: ${{ matrix.java-version }} - cache: maven - - - name: Run tests - run: mvn -B test - - - name: Build package - run: mvn -B package + ci: + uses: UltiKits/ci-workflows/.github/workflows/maven-ci.yml@v1.0.0 + with: + needs-nms: true + mc-version: '1.21.1' + secrets: inherit