Skip to content

ci: set typos action to v1 tag#15

Merged
bkircher merged 9 commits into
mainfrom
update-typos-action
Feb 16, 2026
Merged

ci: set typos action to v1 tag#15
bkircher merged 9 commits into
mainfrom
update-typos-action

Conversation

@bkircher
Copy link
Copy Markdown
Owner

@bkircher bkircher commented Feb 16, 2026

  • ci: set typos action to v1 tag

  • ci: pin cargo-pgrx version to match Cargo.toml

  • ci: fix pgrx cache to avoid rebuilding Postgres

The cache guard checked ~/.pgrx/pg18/ but pgrx installs to
~/.pgrx/18.2/, so the check always failed and Postgres was
compiled from source on every run despite a cache hit. Use a
glob to match the actual install path.

Also key the cache on the pgrx version instead of the full
Cargo.lock hash, since ~/.pgrx only changes when the pgrx or
Postgres major version changes.

  • ci: extract pgrx version into a workflow variable

Avoid duplicating the version string across the install step
and the cache key. A single env.PGRX_VERSION variable makes
future version bumps a one-line change.

  • Bump pgrx from 0.16.1 to 0.17.0

  • Simplify base62_encode and remove dead code

pgrx::Uuid is always 16 bytes, so the length check and
InvalidInput error variant were unreachable. Also replace
the if-let block with the ? operator and use expect for the
infallible UTF-8 conversion of base62 output.

  • ci: cache cargo-pgrx binary across runs

We have now three caches that are hit perfectly:

  1. cargo-pgrx binary — cargo-pgrx-Linux-0.17.0 — restored in ~2s, install step skipped
  2. pgrx home — pgrx-Linux-0.17.0-pg18 — restored in ~5s, Postgres init skipped
  3. cargo build — handled by Swatinem/rust-cache

That's ~8 minutes of compilation saved on every cached run.

@bkircher bkircher self-assigned this Feb 16, 2026
The cache guard checked ~/.pgrx/pg18/ but pgrx installs to
~/.pgrx/18.2/, so the check always failed and Postgres was
compiled from source on every run despite a cache hit. Use a
glob to match the actual install path.

Also key the cache on the pgrx version instead of the full
Cargo.lock hash, since ~/.pgrx only changes when the pgrx or
Postgres major version changes.
Avoid duplicating the version string across the install step
and the cache key. A single env.PGRX_VERSION variable makes
future version bumps a one-line change.
pgrx::Uuid is always 16 bytes, so the length check and
InvalidInput error variant were unreachable. Also replace
the if-let block with the ? operator and use expect for the
infallible UTF-8 conversion of base62 output.
Skip the ~2.5 minute cargo install on cache hits by caching
~/.cargo/bin/cargo-pgrx with a version-based key.
Remove InvalidInput error variant from AGENTS.md and pin
cargo-pgrx version in README install instructions.
@bkircher bkircher merged commit ffbaaac into main Feb 16, 2026
2 checks passed
@bkircher bkircher deleted the update-typos-action branch February 16, 2026 06:41
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