Skip to content

Commit b69d2f7

Browse files
authored
ci: ensure JSON schemas are in sync (#539)
follow-up to #538 We need to ensure that for schemas that have `.ts` file used to generate `.json` file: - users modify the `.ts` file not the `.json` file. - users run `npm run build` to generate the `.json` file and commits this generated file. - that means -> `.ts` and `.json` files are always in sync This adds CI workflow that runs whenever this `.ts` or `.json` file changed, runs the build and check if `.json` file changes or not.
1 parent 5c3e4e4 commit b69d2f7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/test_and_release.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ jobs:
5555
run: npm ci --no-audit
5656
- run: npm run build
5757

58+
- name: Check build consistency
59+
run: |
60+
git diff --exit-code || {
61+
echo -e "Some files changed after running npm run build! Please build the project locally and commit the changes.";
62+
exit 1;
63+
}
64+
5865
lint:
5966
name: Lint
6067
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)