ci: verify that the build has been run #430
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Problem
It is not obvious that
db.jsonand other files in this repo are autogenerated via a build step. (and a fetch step, for the datasource files).It is too easy to open a PR with a diff that will be immediately undone the next time the build step is run and output committed
The solution
Have a CI step which checks if there is a diff after running
npm run build. If there is, it indicates thatdb.jsonwas edited by hand. Which we want to prevent. This won't catch manual edits to the data files likebut it is a good first line of defense.
Context
We should never have to leave review comments like #428 (review) while automation can prevent them passing CI