Skip to content

chore(sql): version the SQL files and test their examples - #80

Merged
Adeniyikayodee merged 4 commits into
mainfrom
chore/sql-hardening
Oct 10, 2026
Merged

Adeniyikayodee merged 4 commits into
mainfrom
chore/sql-hardening

Conversation

@Adeniyikayodee

Copy link
Copy Markdown
Owner

The SQL files shipped with no version, so a database could not tell which copy it had loaded, and their README examples were only checked by hand.

  • Version: both files state version 1.0.0 in their header and report it through ng_postcode_version(). The conformance run checks that the two agree.
  • README examples: scripts/sql_conformance.py postgres now also runs every SQL block in sql/README.md, in order, in a transaction that is rolled back. I confirmed it fails when an example is broken.
  • Grouping page: the Python example on docs/group-by-place.md runs as a test in the Python suite.
  • Releases: a sql-v* tag checks that the tag is on main and matches the version in both files, reruns the conformance cases on both engines, and attaches the two files to a GitHub release. Nothing goes to a registry.

No new CI jobs: the checks ride on steps that already exist.

@Adeniyikayodee
Adeniyikayodee merged commit f7c6aff into main Oct 10, 2026
16 checks passed
@Adeniyikayodee
Adeniyikayodee deleted the chore/sql-hardening branch October 10, 2026 23:48
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