-
-
Notifications
You must be signed in to change notification settings - Fork 108
56 lines (53 loc) · 1.84 KB
/
lua_language_server.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
47
48
49
50
51
52
53
54
55
56
name: Lua Language Server Check
on:
workflow_call:
inputs:
lua_ls_version:
required: true
type: string
neovim_versions:
required: true
type: string
jobs:
lua-language-server:
name: lua language server
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
rev: ${{ fromJson(inputs.neovim_versions) }}
steps:
- uses: actions/checkout@v3
- run: date +%F > todays-date
- name: Restore cache for Neovim
uses: actions/cache@v3
with:
path: .ci/neovim
key: ${{ matrix.rev }}-${{ hashFiles('todays-date') }}
- name: Restore cache for vendor dependencies
uses: actions/cache@v3
with:
path: .ci/vendor
key: ${{ hashFiles('todays-date') }}
- name: Restore cache for lua LS
uses: actions/cache@v3
with:
path: .ci/lua-ls
key: ${{ inputs.lua_ls_version }}
- name: Prepare
run: |
test -d .ci/neovim || {
mkdir -p .ci/neovim
curl -sL "https://github.com/neovim/neovim/releases/download/${{ matrix.rev }}/nvim-linux64.tar.gz" | tar xzf - --strip-components=1 -C "${PWD}/.ci/neovim"
}
test -d .ci/lua-ls || {
mkdir -p .ci/lua-ls
curl -sL "https://github.com/LuaLS/lua-language-server/releases/download/${{ inputs.lua_ls_version }}/lua-language-server-${{ inputs.lua_ls_version }}-linux-x64.tar.gz" | tar xzf - -C "${PWD}/.ci/lua-ls"
}
- name: Run check
run: |
export PATH="${PWD}/.ci/neovim/bin:${PATH}"
export PATH="${PWD}/.ci/lua-ls/bin:${PATH}"
export VIM="${PWD}/.ci/neovim/share/nvim/runtime"
nvim --version
make lua-language-server version=${{ matrix.rev == 'nightly' && 'nightly' || 'stable' }}