Repository navigation
Test infrastructure: JUnit 5, game tests and CI - #82
Merged
Merged
Conversation
- src/test: JUnit 5 on the standard test task. The machine core checks move from the MachineCoreTest main program into ExprTest, MachineStatsTest, InternalsDefinitionTest, MachinePartsTest, AmountMatchTest and InputClaimsTest, one behaviour per test, so a run reports every failure. - Server game tests replace the server-start smoke run: MMDLibGameTests runs each check as its own @gameTest in an empty structure. runGameTestServer loads main and runtimeTest as one mod in a fresh build/gametest world and fails naming every failed test. The checks from RuntimeSmoke are split into ContentSmoke; the machine part files are now test resources. - verifyReleaseClasses also refuses test data in the release jar. - check runs test and runGameTestServer. CI runs check and the GUI smoke test (with and without JEI) under Xvfb on every pull request. - scripts/runtime-smoke.init.gradle is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
Collaborator
|
Okay, some notes, but nothing is a blocker to me merging:
|
This was referenced Nov 2, 2026
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.
What this is
Second PR of the machine module stack, after #81. This one only touches tests, build scripts and CI. Nothing under
src/mainchanges.Unit tests.
src/testis now JUnit 5 on the standardtesttask, with no running game.MachineCoreTestmain program is split intoExprTest,MachineStatsTest,InternalsDefinitionTest,MachinePartsTest,AmountMatchTestandInputClaimsTest, with one behaviour per test.Server game tests.
./gradlew runGameTestServerreplaces the opt-in server smoke run.MMDLibGameTestsruns each check as its own@GameTestin an empty structure.mainandruntimeTestas one mod, in a freshbuild/gametestworld each time, and the task fails naming every failed test.RuntimeSmokemoved toContentSmoke.src/runtimeTest/datapacktosrc/runtimeTest/resources, so they're now served as mod data rather than copied into a world as a datapack.scripts/runtime-smoke.init.gradleis gone.Build.
checknow runstestandrunGameTestServer.verifyReleaseClassesalso fails if test data (data/mmdlib_smoke/,data/mmdlib/structure/) reaches the release jar.CI.
.github/workflows/ci.ymlis new. It runs on every pull request and on pushes to this branch:./gradlew checkReview notes
MachineCoreTest, which this PR deletes. They're all ported: malformed variable names toExprTest,socketAtbounds toInternalsDefinitionTest, unknown keys andMachineParts.checktoMachinePartsTest, and input claims to the newInputClaimsTest.src/builderTestprograms stay as they are here, still run by theirverify*tasks. Moving them to JUnit is a separate follow-up (junit-builder-checks).machine-recipes(registered recipe types and generic JEI) is stacked on this branch and gets its own PR after this lands.Testing
./gradlew checkpasses locally: 52 unit tests with no failures, and all 12 game tests.🤖 Generated with Claude Code
https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo