diff --git a/.github/workflows/deploy-release.yml b/.github/workflows/deploy-release.yml index ad3e0dd..3c3df2b 100644 --- a/.github/workflows/deploy-release.yml +++ b/.github/workflows/deploy-release.yml @@ -368,7 +368,7 @@ jobs: # NeoGradle resolves model inputs during configuration under build/tmp. # Cleaning in the same invocation removes those inputs before setup runs. ./gradlew clean --no-daemon --stacktrace --max-workers=2 - ./gradlew check build javadoc verifyReleaseArtifacts writeReleaseChecksums \ + ./gradlew check build javadoc -PgrassSlabsDirectory=dependencies/grass -PbuildingPiecesDirectory=dependencies/pieces verifyReleaseArtifacts writeReleaseChecksums \ --no-daemon --stacktrace --max-workers=2 else # Preserve the established Forge release lifecycle. diff --git a/src/test/java/zone/moddev/mc/skysterrainsmoother/PublicationContractTest.java b/src/test/java/zone/moddev/mc/skysterrainsmoother/PublicationContractTest.java index 7e0bbf8..2b43ffc 100644 --- a/src/test/java/zone/moddev/mc/skysterrainsmoother/PublicationContractTest.java +++ b/src/test/java/zone/moddev/mc/skysterrainsmoother/PublicationContractTest.java @@ -64,6 +64,24 @@ void mavenUsesTheVerifiedBundleAndCiRunsOnPushAndPullRequest() throws Exception assertTrue(ciWorkflow.contains("--offline")); } + @Test + void everyReleaseBuildUsesTheCheckedOutContentDirectories() throws Exception { + String workflow = text(".github/workflows/deploy-release.yml"); + String build = workflow.split(" - name: Build, test, and audit once", 2)[1] + .split("\\n - name:", 2)[0]; + int commands = 0; + + for (String line : build.split("\\n")) { + if (line.contains("./gradlew") && line.contains("check build javadoc")) { + assertTrue(line.contains("-PgrassSlabsDirectory=dependencies/grass"), line); + assertTrue(line.contains("-PbuildingPiecesDirectory=dependencies/pieces"), line); + commands++; + } + } + + assertEquals(2, commands, "Both loader paths must build the pinned content"); + } + private String text(String path) throws Exception { return new String(Files.readAllBytes(Paths.get(path)), StandardCharsets.UTF_8).replace("\r\n", "\n"); }