Skip to content

ci: cache GeoNames data to avoid re-downloading in tests - #117

Merged
bkeepers merged 1 commit into
mainfrom
ci/cache-geonames-data
Aug 1, 2026
Merged

ci: cache GeoNames data to avoid re-downloading in tests#117
bkeepers merged 1 commit into
mainfrom
ci/cache-geonames-data

Conversation

@bkeepers

@bkeepers bkeepers commented Aug 1, 2026

Copy link
Copy Markdown
Member

The geocode test pulls cities500.zip and admin1CodesASCII.txt from download.geonames.org on every CI run. The download helper already skips fetching when the files are on disk, so the only missing piece was persisting tmp/geonames between runs.

This adds an actions/cache step keyed on geonames-v1. On a cache hit, the ~10MB download is skipped. Bump the version suffix in the key if the data ever needs refreshing.

One caveat: Actions caches populate from the default branch, so the first real speedup lands after this merges to main and CI runs there once. After that, PRs read the cached copy.

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.
@pkg-pr-new

pkg-pr-new Bot commented Aug 1, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@neaps/tide-database@117

commit: 83cff25

@bkeepers
bkeepers merged commit ac4b610 into main Aug 1, 2026
7 checks passed
@bkeepers
bkeepers deleted the ci/cache-geonames-data branch August 1, 2026 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant