Skip to content

Commit 1f98fa2

Browse files
fix(ci): bump lua version
1 parent a4b9859 commit 1f98fa2

2 files changed

Lines changed: 30 additions & 30 deletions

File tree

.github/workflows/lua.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ jobs:
4646
neovim: true
4747
version: ${{ matrix.nvim_version }}
4848
- name: Install luajit
49-
uses: leafo/gh-actions-lua@v10
49+
uses: leafo/gh-actions-lua@v11
5050
with:
51-
luaVersion: "luajit-openresty"
51+
luaVersion: "5.4"
5252
- name: Install luarocks
5353
uses: leafo/gh-actions-luarocks@v4
5454
- name: Run tests

lua-test.sh

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
11
#!/usr/bin/env bash
22
#
33
# Setup and run tests for lua part of gitlab.nvim.
4-
#
4+
#
55
# In order to run tests you need to have `luarocks` and `git` installed. This script will check if
66
# environment is already setup, if not it will initialize current directory with `luarocks`,
77
# install `busted` framework and download plugin dependencies.
8-
#
8+
#
99
#
1010
set -e
1111

12-
LUA_VERSION="5.1"
12+
LUA_VERSION="5.4"
1313
PLUGINS_FOLDER="tests/plugins"
1414
PLUGINS=(
15-
"https://github.com/MunifTanjim/nui.nvim"
16-
"https://github.com/nvim-lua/plenary.nvim"
17-
"https://github.com/sindrets/diffview.nvim"
15+
"https://github.com/MunifTanjim/nui.nvim"
16+
"https://github.com/nvim-lua/plenary.nvim"
17+
"https://github.com/sindrets/diffview.nvim"
1818
)
1919

20-
if ! command -v luarocks > /dev/null 2>&1; then
21-
echo "You need to have luarocks installed in order to run tests."
22-
exit 1
20+
if ! command -v luarocks >/dev/null 2>&1; then
21+
echo "You need to have luarocks installed in order to run tests."
22+
exit 1
2323
fi
2424

25-
if ! command -v git > /dev/null 2>&1; then
26-
echo "You need to have git installed in order to run tests."
27-
exit 1
25+
if ! command -v git >/dev/null 2>&1; then
26+
echo "You need to have git installed in order to run tests."
27+
exit 1
2828
fi
2929

30-
if ! luarocks --lua-version=$LUA_VERSION which busted > /dev/null 2>&1; then
31-
echo "Installing busted."
32-
luarocks init
33-
luarocks config --scope project lua_version "$LUA_VERSION"
34-
luarocks install --lua-version="$LUA_VERSION" busted
30+
if ! luarocks --lua-version=$LUA_VERSION which busted >/dev/null 2>&1; then
31+
echo "Installing busted."
32+
luarocks init
33+
luarocks config --scope project lua_version "$LUA_VERSION"
34+
luarocks install --lua-version="$LUA_VERSION" busted
3535
fi
3636

3737
for arg in "$@"; do
38-
if [[ $arg =~ "--coverage" ]] && ! luarocks --lua-version=$LUA_VERSION which luacov > /dev/null 2>&1; then
38+
if [[ $arg =~ "--coverage" ]] && ! luarocks --lua-version=$LUA_VERSION which luacov >/dev/null 2>&1; then
3939
luarocks install --lua-version="$LUA_VERSION" luacov
4040
# lcov reporter for luacov - lcov format is supported by `nvim-coverage`
4141
luarocks install --lua-version="$LUA_VERSION" luacov-reporter-lcov
42-
fi
42+
fi
4343
done
4444

4545
for plugin in "${PLUGINS[@]}"; do
46-
plugin_name=${plugin##*/}
47-
plugin_folder="$PLUGINS_FOLDER/$plugin_name"
46+
plugin_name=${plugin##*/}
47+
plugin_folder="$PLUGINS_FOLDER/$plugin_name"
4848

49-
# Check if plugin was already downloaded
50-
if [[ -d "$plugin_folder/.git" ]]; then
51-
# We could also try to pull here but I am not sure if that wouldn't slow down tests too much.
52-
continue
53-
fi
49+
# Check if plugin was already downloaded
50+
if [[ -d "$plugin_folder/.git" ]]; then
51+
# We could also try to pull here but I am not sure if that wouldn't slow down tests too much.
52+
continue
53+
fi
5454

55-
git clone --depth 1 "$plugin" "$plugin_folder"
55+
git clone --depth 1 "$plugin" "$plugin_folder"
5656

5757
done
5858

59-
nvim -u NONE -U NONE -N -i NONE -l tests/init.lua "$@"
59+
nvim -u NONE -U NONE -N -i NONE -l tests/init.lua "$@"

0 commit comments

Comments
 (0)