From 83cff25b28e3fe136b7cb22acd77002aebe62efe Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Sat, 1 Aug 2026 08:11:58 -0400 Subject: [PATCH] ci: cache GeoNames data to avoid re-downloading in tests The geocode test downloads cities500.zip and admin1CodesASCII.txt from download.geonames.org on every CI run. downloadData() skips the fetch when the files already exist, so caching tmp/geonames across runs eliminates the repeated ~10MB download. --- .github/workflows/ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d085ba1af..0d51ed162 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,6 +39,15 @@ jobs: name: npm-dist path: "*.tgz" + # GeoNames data (cities500 + admin1 codes) is downloaded by the geocode + # test on first run. Cache it so we don't re-fetch ~10MB from + # download.geonames.org on every run. Bump the -v1 suffix to force a refresh. + - name: Cache GeoNames data + uses: actions/cache@v4 + with: + path: tmp/geonames + key: geonames-v1 + - name: Run tests run: npm run test