ci: install treesitter

ci: add parsers cache

ci: NVIM_TS_SHA

ci: remove is_CI
This commit is contained in:
Lewis Russell 2024-07-02 15:40:25 +01:00
parent a2d8aa6d0c
commit 27e5488c13
4 changed files with 20 additions and 9 deletions

View file

@ -24,7 +24,6 @@ jobs:
env:
NEOVIM_VERSION: ${{ matrix.neovim_version }}
IS_CI: 1
steps:
- name: Checkout
@ -36,6 +35,8 @@ jobs:
- uses: leafo/gh-actions-luarocks@v4
- uses: tree-sitter/setup-action/cli@v1
- name: Download nvim-test
run: make nvim-test

View file

@ -16,7 +16,6 @@ jobs:
env:
NVIM_TS_SHA: master
IS_CI: 1
steps:
- name: Checkout
@ -28,14 +27,30 @@ jobs:
- uses: leafo/gh-actions-luarocks@v4
- uses: tree-sitter/setup-action/cli@v1
- name: Download nvim-test
run: make nvim-test
- name: Download nvim-treesitter
run: make nvim-treesitter
- name: Setup Parsers Cache
id: parsers-cache
uses: actions/cache@v4
with:
path: |
./nvim-treesitter/parser/
key: parsers-${{ join(matrix.*, '-') }}-${{ hashFiles(
'./nvim-treesitter/lockfile.json',
'./nvim-treesitter/lua/nvim-treesitter/install.lua',
'./nvim-treesitter/lua/nvim-treesitter/parsers.lua') }}
- name: Install parsers
run: make parsers
- name: Run Test
run: make test NVIM_TS_SHA=$NVIM_TS_SHA
run: make test
- uses: stefanzweifel/git-auto-commit-action@v5
with:

View file

@ -2,7 +2,7 @@
NEOVIM_VERSION := v0.9.5
NVIM_TS_SHA := 98460428
NVIM_TS_SHA ?= 98460428
FILTER=.*

View file

@ -7,11 +7,6 @@ local cmd = helpers.api.nvim_command
local feed = helpers.feed
local function install_langs(langs)
-- Shouldn't need to do this, but CI seems to hang on some languages
if os.getenv('IS_CI') then
return
end
if type(langs) == 'string' then
langs = {langs}
end