feat: launch a Minecraft client in CI to verify the mod works in-game#22
Merged
Conversation
Registers a runProductionClientGameTest Loom task that boots a real production Fabric client (fabric-loader + the built jar + fabric-api, modmenu and cloth-config via productionRuntimeMods) under XVFB and fails if the game does not reach the title screen and exit cleanly. The build workflow now runs it after the build and uploads the game logs and screenshots as artifacts. Also bumps modmenu to 20.0.0-alpha.1 and cloth-config to 26.2.155: the launch test caught that modmenu 18.x/19.x crash on Minecraft 26.2 at the title screen (NoSuchMethodError: I18n.exists in its TitleScreen mixin). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HqYsmitMrdZZBkd7zHTgYA
Adds a client gametest mod (gametest source set) that the production launch task now loads alongside the built jar. The test screenshots the title screen, creates a survival singleplayer world, waits for chunks to render and the world to tick with the HUD active, screenshots it, then exits. Any crash on the way fails the build, and the screenshots are uploaded with the existing client-launch-test artifact. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HqYsmitMrdZZBkd7zHTgYA
The gametest now fails if takeScreenshot did not produce a non-empty PNG. The workflow gains a step that publishes the survival world screenshot to a ci-screenshots branch and keeps a single PR comment updated with it as a visual sanity check. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HqYsmitMrdZZBkd7zHTgYA
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HqYsmitMrdZZBkd7zHTgYA
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
CI now verifies the mod in a real running game. On every push, the workflow builds the jar, boots a production Fabric client (Minecraft 26.2 + Fabric Loader with Fabric API, Mod Menu, and Cloth Config as real mod jars) under a virtual display, generates and enters a survival singleplayer world with the HUD active, and fails the build if the game crashes anywhere along the way. The in-world screenshot is posted on the pull request as a quick visual sanity check.
Key Changes
.github/workflows/build.yml)runProductionClientGameTestGradle task after the buildci-screenshotsbranch so older comments keep renderingclient-launch-testartifact, including on failure, for easy crash diagnosiscontents: write/pull-requests: writepermissions for the screenshot step, and renames all steps to consistent title casebuild.gradle)runProductionClientGameTest(LoomClientProductionRunTask), which launches a production client with the built mod jar, the dependency mods from the newproductionRuntimeModsconfiguration, and the gametest mod; on Linux CI Loom runs it under Xvfb automaticallygametestsource set viafabricApi.configureTestsand packages it asgametestJarsrc/gametest/)gradle.properties)NoSuchMethodError: I18n.existsin its TitleScreen mixin)Notes
🤖 Generated with Claude Code
https://claude.ai/code/session_01HqYsmitMrdZZBkd7zHTgYA