ci(lint): make sure query parser is installed from this repo

Problem: format-queries.lua in CI uses the bundled query parser from
Neovim, meaning breaking changes are not reflected in tests.

Solution: Install nvim-treesitter in the lint workflow and use it to
install the query parser.
This commit is contained in:
Christian Clason 2024-05-25 19:09:55 +02:00
parent 78e11ab7ce
commit d3acd105bd

View file

@ -36,15 +36,16 @@ jobs:
format-queries:
name: Lint queries
runs-on: ubuntu-latest
env:
NVIM_TAG: stable
steps:
- uses: actions/checkout@v4
- name: Prepare
run: |
wget https://github.com/neovim/neovim/releases/download/nightly/nvim-linux64.tar.gz
tar -zxf nvim-linux64.tar.gz
sudo ln -s "$PWD"/nvim-linux64/bin/nvim /usr/local/bin
bash ./scripts/ci-install.sh
- name: Lint
run: |
nvim --headless -c "TSInstallSync query" -c "q"
nvim -l scripts/format-queries.lua
git diff --exit-code