From 9e90cb42eb4b28490b99581cee2d3475a998bb04 Mon Sep 17 00:00:00 2001 From: TheLeoP Date: Mon, 7 Jul 2025 17:39:34 -0500 Subject: [PATCH] ci: install treesitter parsers without nvim-treesitter Co-authored-by: Dmytro Soltys --- .github/workflows/neovim.yml | 44 +++++++++++++++------ .github/workflows/neovim_treesitter.yml | 51 ------------------------- 2 files changed, 33 insertions(+), 62 deletions(-) delete mode 100644 .github/workflows/neovim_treesitter.yml diff --git a/.github/workflows/neovim.yml b/.github/workflows/neovim.yml index 13b8847..ef941a9 100644 --- a/.github/workflows/neovim.yml +++ b/.github/workflows/neovim.yml @@ -3,7 +3,7 @@ name: Neovim on: push: branches: - - '*' + - "*" pull_request: branches: - master @@ -13,28 +13,50 @@ jobs: strategy: matrix: neovim_version: - - 'head' - - 'v0.10.1' + - "head" + - "v0.10.1" runs-on: ubuntu-latest steps: - - uses: 'actions/checkout@v2' + - uses: "actions/checkout@v2" + - uses: tree-sitter/setup-action@v2 + with: + install-lib: false - name: Install vader.vim run: git clone --depth=1 https://github.com/junegunn/vader.vim.git test/vader/vader.vim - - name: 'setup Neovim' - uses: 'thinca/action-setup-vim@v2' + - name: "setup Neovim" + uses: "thinca/action-setup-vim@v2" with: - vim_version: '${{ matrix.neovim_version }}' - vim_type: 'Neovim' + vim_version: "${{ matrix.neovim_version }}" + vim_type: "Neovim" - - name: 'Show version' + - name: "Show version" run: nvim --version - - name: 'Run test' + - name: Clone tree-sitter-python + run: git clone --depth=1 https://github.com/tree-sitter/tree-sitter-python.git + working-directory: /tmp + + - name: Clone tree-sitter-ruby + run: git clone --depth=1 https://github.com/tree-sitter/tree-sitter-ruby.git + working-directory: /tmp + + - name: Create default nvim runtime parser directory + run: mkdir -p $HOME/.local/share/nvim/site/parser + + - name: Build tree-sitter-python + run: tree-sitter build -o $HOME/.local/share/nvim/site/parser/python.so + working-directory: /tmp/tree-sitter-python + + - name: Build tree-sitter-ruby + run: tree-sitter build -o $HOME/.local/share/nvim/site/parser/ruby.so + working-directory: /tmp/tree-sitter-ruby + + - name: "Run test" run: | bash -c 'VIMCMD=nvim test/vader/run' - - name: 'Run new tests' + - name: "Run new tests" run: | cd ./test/new && make -j1 && make -j1 coverage diff --git a/.github/workflows/neovim_treesitter.yml b/.github/workflows/neovim_treesitter.yml deleted file mode 100644 index 52ea1fa..0000000 --- a/.github/workflows/neovim_treesitter.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Neovim with Tree-sitter - -on: - push: - branches: - - '*' - pull_request: - branches: - - master - -jobs: - build: - strategy: - matrix: - neovim_version: - - 'head' - - 'v0.10.1' - runs-on: ubuntu-latest - env: - TESTS_ENABLE_TREESITTER: 1 - steps: - - uses: 'actions/checkout@v2' - - - name: Install vader.vim - run: git clone --depth=1 https://github.com/junegunn/vader.vim.git test/vader/vader.vim - - - name: 'setup Neovim' - uses: 'thinca/action-setup-vim@v2' - with: - vim_version: '${{ matrix.neovim_version }}' - vim_type: 'Neovim' - - - name: Install nvim-treesitter - run: git clone --depth=1 https://github.com/nvim-treesitter/nvim-treesitter.git test/vader/plugged/nvim-treesitter - - - name: Install python treesitter module - run: nvim --headless -Nu test/vader/minvimrc -c 'TSInstallSync python' -c 'q' - - - name: 'Show version' - run: nvim --version - - - name: 'Run test' - run: | - bash -c 'VIMCMD=nvim test/vader/run' - - - name: Install ruby treesitter module - run: nvim --headless -Nu test/vader/minvimrc -c 'TSInstallSync ruby' -c 'q' - - - name: 'Run new tests' - run: | - cd ./test/new && make -j1 && make -j1 coverage