generated from nvim-treesitter/module-template
-
Notifications
You must be signed in to change notification settings - Fork 200
46 lines (40 loc) · 1.5 KB
/
check_query_files.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Check loading of syntax files
on:
pull_request:
branches:
- "main"
workflow_dispatch:
jobs:
luacheck:
name: Check Query Files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: tree-sitter/setup-action/cli@v1
- name: Prepare
env:
NVIM_TAG: nightly
run: |
sudo apt-get update && sudo apt-get install libfuse2
sudo add-apt-repository universe
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
mkdir -p ~/.local/share/nvim/site/pack/ci/start
ln -s $(pwd) ~/.local/share/nvim/site/pack/ci/start
cd ~/.local/share/nvim/site/pack/ci/start
git clone -b main https://github.com/nvim-treesitter/nvim-treesitter.git
cp nvim-treesitter/lua/nvim-treesitter/parsers.lua ~/work/nvim-treesitter-textobjects/nvim-treesitter-textobjects/
- name: Setup Parsers Cache
id: parsers-cache
uses: actions/cache@v4
with:
path: ~/.local/share/nvim/site/parser/
key: parsers-${{ hashFiles('parsers.lua') }}
- name: Compile parsers Unix like
if: ${{ steps.parsers-cache.outputs.cache-hit != 'true' }}
run: nvim -l scripts/install_parsers.lua all
- name: Check query files
run: |
ls
nvim --headless -c "luafile ./scripts/check-queries.lua" -c "q"