From 486b81a6ecadd4f6b6b3c220abf39c604e89ddae Mon Sep 17 00:00:00 2001 From: Matthew Keeler Date: Fri, 26 Jun 2026 15:12:46 -0400 Subject: [PATCH] fix: Use Maven Central mirror and cache for WireMock in Windows CI The Windows CI job downloaded the WireMock standalone jar from Maven Central on every run. Maven Central blocks GitHub's shared runner IPs for automated consumption, returning a 403 Terms of Service error. Switch the download to the Google-hosted Maven Central mirror, which serves the identical artifact without that limit, and cache the jar with actions/cache so it is only fetched on a cache miss. The existing checksum verification still runs against both fresh and cached jars. --- .github/workflows/ci.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35b2399e..a5cea021 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,8 +63,19 @@ jobs: - name: Install java support run: choco install -y javaruntime + - name: Cache wiremock + id: cache-wiremock + uses: actions/cache@v4 + with: + path: wiremock.jar + key: wiremock-jre8-standalone-2.31.0 + - name: Download wiremock - run: Invoke-WebRequest -Uri https://repo1.maven.org/maven2/com/github/tomakehurst/wiremock-jre8-standalone/2.31.0/wiremock-jre8-standalone-2.31.0.jar -UseBasicParsing -OutFile wiremock.jar + if: steps.cache-wiremock.outputs.cache-hit != 'true' + # Use the Google-hosted Maven Central mirror rather than repo1.maven.org. + # Maven Central blocks GitHub's shared runner IPs for automated consumption, + # while the GCS mirror serves the identical artifact without that limit. + run: Invoke-WebRequest -Uri https://maven-central.storage-download.googleapis.com/maven2/com/github/tomakehurst/wiremock-jre8-standalone/2.31.0/wiremock-jre8-standalone-2.31.0.jar -UseBasicParsing -OutFile wiremock.jar - name: Verify checksum shell: bash