Skip to content

Commit

Permalink
Turns out we weren't actually failing on out of sync files. Fix this.
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross35 committed Feb 22, 2024
1 parent 6e4fa76 commit 793dd8b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:

jobs:
codestyle:
name: Codestyle (format and lint)
name: codestyle & generated files
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
Expand All @@ -29,11 +29,11 @@ jobs:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-
- run: |
npm --version
npx --version
- run: just setup
- run: just --verbose ci-codestyle
- name: Verify generated files are up to date
run: just --verbose ci-validate-generated-files
- name: Check codestyle
run: just --verbose ci-codestyle

test:
runs-on: ${{ matrix.os }}
Expand All @@ -58,14 +58,9 @@ jobs:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-
- run: |
npm --version
npx --version
- run: npm install --locked
- name: Configure
run: just --verbose configure-tree-sitter
- name: Check generated files
run: just --verbose ci-validate-generated-files
- name: Run tests
run: just --verbose test

Expand Down
4 changes: 2 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -239,14 +239,14 @@ ci-validate-generated-files:

failed=false
git diff ci-tmp-pre-updates --exit-code || failed=true
git tag -d ci-tmp-pre-updates

if ! [ "$failed" = "false" ]; then
echo '::warning::Generated files are out of date!'
echo '::warning::run `just gen` and commit the changes'
exit 1
fi

git tag -d ci-tmp-pre-updates

# Run a subset of CI checks before committing.
pre-commit: _lint-min format-check

Expand Down
2 changes: 1 addition & 1 deletion queries/just/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@

; Comments

(comment) @comment
(comment) @spell @comment

(shebang) @comment

Expand Down

0 comments on commit 793dd8b

Please sign in to comment.