Repair the Gradle test suite and run it on PRs - #1
Closed
grepsedawk wants to merge 157 commits into
Closed
Conversation
…king # Conflicts: # plugins/simpleadminhacks-paper/src/main/java/com/programmerdan/minecraft/simpleadminhacks/hacks/basic/NameLocker.java
This reverts commit c2d81a3.
Fix change colour text being italicized
expose debugger for proxy during development
There was a problem hiding this comment.
Code Review
This pull request introduces JUnit 5 and MockBukkit to the project, providing a testing framework and a way to mock the Bukkit/Paper runtime. It includes a custom Gradle task to strip conflicting ServiceLoader providers from the Paper server jar to ensure compatibility with MockBukkit. Review feedback identifies that the JUnit version specified (6.0.3) is invalid and should be corrected to compatible Jupiter and Platform versions. Additionally, suggestions were made to improve Gradle configuration by avoiding eager provider evaluation to preserve configuration caching and using more precise file patterns for JAR exclusions.
grepsedawk
force-pushed
the
fix-test-suite
branch
5 times, most recently
from
April 20, 2026 00:28
1de4174 to
086aee7
Compare
The test suite was effectively dead. useJUnitPlatform() was never configured in the parent plugins/build.gradle.kts, so every plugin's test task discovered zero tests and reported BUILD SUCCESSFUL even when src/test/ contained real JUnit 5 tests. The pinned JUnit (5.8.2) also fell out of alignment with the platform launcher Gradle ships, which would have failed discovery once useJUnitPlatform() was added anyway. This change enables useJUnitPlatform() once at the parent so every plugin inherits it. JUnit is bumped to 6.0.3 with the platform launcher pinned to the same version ref so the engine and launcher stay aligned. The Check All workflow now publishes a JUnit report and uploads the HTML test results on failure, so PR authors can see what broke without re-running the build locally. A paperweight cache step keeps paper-server from being regenerated on every PR run. civmodcore-paper adopts MockBukkit per the supported pattern at https://docs.mockbukkit.org/docs/en/user_guide/advanced/paperweight, which sets paperweight's addServerDependencyTo to compileOnly so the mojang-mapped server jar stays off the test classpath and MockBukkit owns it. NBTTests is removed because it depends on net.minecraft.* classes that the supported pattern intentionally excludes; the file had been broken since it was written. testBaseComponent stays disabled because its legacy/Adventure display-name assertion no longer holds in current Paper. civmodcore-paper is now a working baseline that other plugins can build off of when adding tests.
grepsedawk
force-pushed
the
fix-test-suite
branch
from
April 20, 2026 00:38
086aee7 to
c0ee8d7
Compare
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
Test the CI workflow added in this branch before opening upstream.
The substantive change wires up the Gradle test suite end to end:
useJUnitPlatform()once at the parent so every plugin inherits itItemMetaTestsruns againmikepenz/action-junit-report), HTML report upload on failure, and a paperweight cache stepTest plan
Cache paperweightstep restores from key, paperweight setup is fasterJUnit Test Reportcheck appears on the PR with passing teststest-reportsartifact uploads; revert