From e576ad70843122965522706423b9afe0e95a056e Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Wed, 3 Jan 2024 17:19:33 -0600 Subject: [PATCH] Add CI check that tree-sitter files are up to date --- .github/workflows/ci.yaml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8826d59..7b1f6a2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -26,7 +26,22 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 18 + - run: git tag pre-updates - run: npm install + - name: Create generated files + shell: bash + run: | + npm run gen + + failed=false + echo different files: + git diff pre-updates --name-only --exit-code || failed=true + echo end different files + + if ! [ "$failed" = "false" ]; then + echo '::error::Generated files are out of date!' + echo '::error::run `npm run gen` and commit the changes' + exit "$exitcode" + fi - run: npm test # FIXME: also parse tests/*.just -