From da0a87809c2d9eb61aa3c114b66187909af6bc1a Mon Sep 17 00:00:00 2001 From: Lukas Reineke Date: Tue, 29 Aug 2023 23:14:02 +0900 Subject: [PATCH] fixup! TEMP --- .github/workflows/pr_check.yml | 39 +++++++++++++++++++++++++++++++++- Makefile | 3 +++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr_check.yml b/.github/workflows/pr_check.yml index 55797bc7..16ad35a2 100644 --- a/.github/workflows/pr_check.yml +++ b/.github/workflows/pr_check.yml @@ -5,7 +5,7 @@ on: push: jobs: - run_tests: + tests: name: unit tests runs-on: ${{ matrix.os }} strategy: @@ -38,6 +38,43 @@ jobs: nvim --version make test + lua-language-server: + name: unit tests + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-22.04 + rev: nightly/nvim-linux64.tar.gz + version: nightly + - os: ubuntu-22.04 + rev: v0.9.1/nvim-linux64.tar.gz + version: stable + steps: + - uses: actions/checkout@v3 + - run: date +%F > todays-date + - name: Restore cache for today's nightly. + uses: actions/cache@v3 + with: + path: _neovim + key: ${{ runner.os }}-${{ matrix.rev }}-${{ hashFiles('todays-date') }} + - name: Prepare + run: | + test -d _neovim || { + mkdir -p _neovim + curl -sL "https://github.com/neovim/neovim/releases/download/${{ matrix.rev }}" | tar xzf - --strip-components=1 -C "${PWD}/_neovim" + } + git clone https://github.com/LuaLS/lua-language-server + cd lua-language-server && ./make.sh + + - name: Run check + run: | + export PATH="${PWD}/_neovim/bin:${PATH}" + export VIM="${PWD}/_neovim/share/nvim/runtime" + nvim --version + make lua-language-server version=${{ matrix.version }} + stylua: name: stylua runs-on: ubuntu-22.04 diff --git a/Makefile b/Makefile index 186bb76c..a176615b 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,9 @@ test: dependencies lint: luacheck . +lua-language-server: + lua-language-server --configpath .ci.$(version).luarc.json --logpath lua-language-server-log --check . + dependencies: if [ ! -d vendor ]; then \ git clone --depth 1 \