aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/test-core.yml
blob: f20f1939df25c88f740f3f2f1a423b8106dac9e6 (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
on:
  workflow_call:
    inputs:
      type:
        type: string
  workflow_dispatch:

defaults:
  run:
    shell: bash

jobs:
  check_compilation:
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
        nvim_tag: [nightly]
    name: ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    env:
      NVIM: ${{ matrix.os == 'windows-latest' && 'nvim-win64\\bin\\nvim.exe' || 'nvim' }}
    steps:
      - uses: actions/checkout@v5
      - uses: tree-sitter/setup-action/cli@v1
      - uses: ilammy/msvc-dev-cmd@v1

      - name: Install and prepare Neovim
        env:
          NVIM_TAG: ${{ matrix.nvim_tag }}
        run: |
          bash ./scripts/ci-install.sh

      - if: inputs.type == 'build'
        name: Compile parsers
        run: $NVIM -l ./scripts/install-parsers.lua --max-jobs=10

      - if: inputs.type == 'generate'
        name: Generate and compile parsers
        run: $NVIM -l ./scripts/install-parsers.lua --generate --max-jobs=2

      - name: Check parsers
        run: $NVIM -l ./scripts/check-parsers.lua

      - name: Check queries (nvim)
        if: ${{ matrix.os == 'windows-latest' }}
        run: $NVIM -l ./scripts/check-queries.lua

      - name: Check queries (tsqueryls)
        if: ${{ matrix.os != 'windows-latest' }}
        run: make checkquery

      - name: Run highlight tests
        if: ${{ matrix.os != 'windows-latest' }}
        run: make tests TESTS=query NVIM_BIN=$NVIM

      - name: Run indents tests
        if: ${{ matrix.os != 'windows-latest' }}
        run: make tests TESTS=indent NVIM_BIN=$NVIM