Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-reineke committed Oct 2, 2023
1 parent af58360 commit f2299c2
Show file tree
Hide file tree
Showing 6 changed files with 141 additions and 139 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/lua_language_server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Run Lua Language Server check

on:
workflow_call:
inputs:
matrix:
required: true
type: string

jobs:
lua-language-server:
name: lua language server
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(inputs.matrix) }}
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: ${{ matrix.rev }}-${{ hashFiles('todays-date') }}
- name: Restore vendor dependencies
uses: actions/cache@v3
with:
path: vendor
key: ${{ hashFiles('todays-date') }}
- name: Restore cache for lua LS
uses: actions/cache@v3
with:
path: _lua-ls
key: 3.7.0
- 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"
}
test -d _lua-ls || {
mkdir -p _lua-ls
curl -sL "https://github.com/LuaLS/lua-language-server/releases/download/3.7.0/lua-language-server-3.7.0-linux-x64.tar.gz" | tar xzf - -C "${PWD}/_lua-ls"
}
- name: Run check
run: |
export PATH="${PWD}/_neovim/bin:${PATH}"
export PATH="${PWD}/_lua-ls/bin:${PATH}"
export VIM="${PWD}/_neovim/share/nvim/runtime"
nvim --version
make lua-language-server type_version=${{ matrix.type_version }}
60 changes: 0 additions & 60 deletions .github/workflows/nightly-check.yml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/nightly_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Nightly Neovim check
# Checks LSP and unit tests against new Neovim nightly once a week

on:
# schedule:
# - cron: '30 21 * * 0' # 6:30 AM JST, Monday
# workflow_dispatch:
push:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
tests:
uses: ./.github/workflows/tests.yml
with:
matrix: |
[
{"rev": "nightly/nvim-linux64.tar.gz"}
]
lua-language-server:
uses: ./.github/workflows/lua_language_server.yml
with:
matrix: |
[
{"type_version": "nightly", "rev": "nightly/nvim-linux64.tar.gz"}
]
98 changes: 20 additions & 78 deletions .github/workflows/pr_check.yml
Original file line number Diff line number Diff line change
@@ -1,93 +1,35 @@
name: Pull request check

on:
pull_request:
push:
# pull_request:

env:
NEOVIM_STABLE_VERSION: 0.9.2
LUA_LANGUAGE_SERVER_VERSION: 3.7.0

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
tests:
name: unit tests
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- version: nightly
rev: nightly/nvim-linux64.tar.gz
- version: stable
rev: v0.9.2/nvim-linux64.tar.gz
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: ${{ 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"
}
- name: Run tests
run: |
export PATH="${PWD}/_neovim/bin:${PATH}"
export VIM="${PWD}/_neovim/share/nvim/runtime"
nvim --version
make test
uses: ./.github/workflows/tests.yml
with:
matrix: |
[
{"rev": "nightly/nvim-linux64.tar.gz"},
{"rev": "v$NEOVIM_STABLE_VERSION/nvim-linux64.tar.gz"}
]
lua-language-server:
name: lua language server
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- version: nightly
rev: nightly/nvim-linux64.tar.gz
- version: stable
rev: v0.9.2/nvim-linux64.tar.gz
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: ${{ matrix.rev }}-${{ hashFiles('todays-date') }}
- name: Restore vendor dependencies
uses: actions/cache@v3
with:
path: vendor
key: ${{ hashFiles('todays-date') }}
- name: Restore cache for lua LS
uses: actions/cache@v3
with:
path: _lua-ls
key: 3.7.0
- 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"
}
test -d _lua-ls || {
mkdir -p _lua-ls
curl -sL "https://github.com/LuaLS/lua-language-server/releases/download/3.7.0/lua-language-server-3.7.0-linux-x64.tar.gz" | tar xzf - -C "${PWD}/_lua-ls"
}
- name: Run check
run: |
export PATH="${PWD}/_neovim/bin:${PATH}"
export PATH="${PWD}/_lua-ls/bin:${PATH}"
export VIM="${PWD}/_neovim/share/nvim/runtime"
nvim --version
make lua-language-server version=${{ matrix.version }}
uses: ./.github/workflows/lua_language_server.yml
with:
matrix: |
[
{"type_version": "nightly", "rev": "nightly/nvim-linux64.tar.gz"},
{"type_version": "stable", "rev": "v$NEOVIM_STABLE_VERSION/nvim-linux64.tar.gz"}
]
stylua:
name: stylua
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Run tests

on:
workflow_call:
inputs:
matrix:
required: true
type: string

jobs:
tests:
name: unit tests
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(inputs.matrix) }}
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: ${{ 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"
}
- name: Run tests
run: |
export PATH="${PWD}/_neovim/bin:${PATH}"
export VIM="${PWD}/_neovim/share/nvim/runtime"
nvim --version
make test
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ stylua:

lua-language-server: dependencies
rm -rf lua-language-server-log
lua-language-server --configpath .luarc.$(version).json --logpath lua-language-server-log --check .
lua-language-server --configpath .luarc.$(type_version).json --logpath lua-language-server-log --check .
[ -f lua-language-server-log/check.json ] && { cat lua-language-server-log/check.json 2>/dev/null; exit 1; } || true

dependencies:
Expand Down

0 comments on commit f2299c2

Please sign in to comment.