diff --git a/.github/workflows/integ-test-cache-cleanup.yml b/.github/workflows/integ-test-cache-cleanup.yml index fc6f42e..2b9d691 100644 --- a/.github/workflows/integ-test-cache-cleanup.yml +++ b/.github/workflows/integ-test-cache-cleanup.yml @@ -34,7 +34,7 @@ jobs: cache-read-only: false # For testing, allow writing cache entries on non-default branches - name: Build with 3.1 working-directory: test/jest/resources/cache-cleanup - run: gradle --no-daemon --build-cache -Dcommons_math3_version=3.1 build + run: gradle --no-daemon --build-cache -Dcommons_math3_version="3.1" build # Second build will use the cache from the first build, but cleanup should remove unused artifacts assemble-build: @@ -55,7 +55,7 @@ jobs: gradle-home-cache-cleanup: true - name: Build with 3.1.1 working-directory: test/jest/resources/cache-cleanup - run: gradle --no-daemon --build-cache -Dcommons_math3_version=3.1.1 build + run: gradle --no-daemon --build-cache -Dcommons_math3_version="3.1.1" build check-clean-cache: needs: assemble-build @@ -75,6 +75,7 @@ jobs: - name: Report Gradle User Home run: du -hc ~/.gradle/caches/modules-2 - name: Verify cleaned cache + shell: bash run: | if [ ! -e ~/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-math3/3.1.1 ]; then echo "::error ::Should find commons-math3 3.1.1 in cache" diff --git a/test/jest/cache-cleanup.test.ts b/test/jest/cache-cleanup.test.ts index 28c39cd..bd504cf 100644 --- a/test/jest/cache-cleanup.test.ts +++ b/test/jest/cache-cleanup.test.ts @@ -63,17 +63,17 @@ test('will cleanup unused gradle versions', async () => { }) async function runGradleBuild(projectRoot: string, args: string, version: string = '3.1'): Promise { - const status31 = await exec.exec(`gradle -g HOME --no-daemon --build-cache -Dcommons_math3_version=${version} ${args}`, [], { + const status31 = await exec.exec(`gradle -g HOME --no-daemon --build-cache -Dcommons_math3_version="${version}" ${args}`, [], { cwd: projectRoot }) console.log(`Gradle User Home initialized with commons_math3_version=${version} ${args}`) } async function runGradleWrapperBuild(projectRoot: string, args: string, version: string = '3.1'): Promise { - const status31 = await exec.exec(`./gradlew -g HOME --no-daemon --build-cache -Dcommons_math3_version=${version} ${args}`, [], { + const status31 = await exec.exec(`./gradlew -g HOME --no-daemon --build-cache -Dcommons_math3_version="${version}" ${args}`, [], { cwd: projectRoot }) - console.log(`Gradle User Home initialized with commons_math3_version=${version} ${args}`) + console.log(`Gradle User Home initialized with commons_math3_version="${version}" ${args}`) } function prepareTestProject(): string {