aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/check_query_files.yml
blob: d6298b6eea662a2096084f12f97951c2bb2e9534 (plain) (blame)
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
name: Check loading of syntax files

on: [push, pull_request]

jobs:
  luacheck:
    name: Check Query Files
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1

      - name: Prepare
        run: |
          sudo apt-get update
          sudo add-apt-repository universe
          sudo apt-get install -y npm
          npm i -g tree-sitter
          wget https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage
          chmod u+x nvim.appimage
          mkdir -p ~/.local/share/nvim/site/pack/nvim-treesitter/start
          ln -s $(pwd) ~/.local/share/nvim/site/pack/nvim-treesitter/start

      - name: Compile parsers
        run: ./nvim.appimage --headless -c "TSInstallSync all" -c "q"

      - name: Check query files
        run: ./nvim.appimage --headless -c "luafile ./scripts/check-queries.lua" -c "q"

      - uses: actions/upload-artifact@v2
        with:
          name: parsers
          path: parser/*