2021-05-05 18:04:16 +00:00
|
|
|
name: Tests
|
|
|
|
|
2021-05-09 21:11:18 +00:00
|
|
|
on:
|
2021-05-05 18:04:16 +00:00
|
|
|
push:
|
2021-05-06 12:14:06 +00:00
|
|
|
branches: [master]
|
2021-05-05 18:04:16 +00:00
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
appimage-ubuntu:
|
|
|
|
name: ubuntu
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-09-04 05:41:04 +00:00
|
|
|
- name: Setup Test Environment
|
|
|
|
run: |
|
|
|
|
date +%F > todays-date
|
|
|
|
mkdir -p ~/.local/share/nvim/site/pack/vendor/start
|
|
|
|
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim
|
|
|
|
git clone --depth 1 https://github.com/kyazdani42/nvim-web-devicons ~/.local/share/nvim/site/pack/vendor/start/nvim-web-devicons
|
|
|
|
ln -s $(pwd) ~/.local/share/nvim/site/pack/vendor/start
|
|
|
|
- name: Get neovim v0.5.0
|
2021-05-05 18:04:16 +00:00
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
2021-09-04 05:41:04 +00:00
|
|
|
build/neovim/v0.5.0
|
|
|
|
key: ${{ runner.os }}-appimage-0.5
|
|
|
|
- name: Run Test on neovim v0.5.0
|
|
|
|
run: |
|
|
|
|
test -d build/neovim/v0.5.0 || {
|
|
|
|
mkdir -p build/neovim/v0.5.0
|
|
|
|
curl -Lo build/neovim/v0.5.0/nvim https://github.com/neovim/neovim/releases/download/v0.5.0/nvim.appimage
|
|
|
|
chmod +x build/neovim/v0.5.0/nvim
|
|
|
|
}
|
|
|
|
build/neovim/v0.5.0/nvim --headless -u lua/tests/minimal_init.lua -c "PlenaryBustedDirectory lua/tests/ { minimal_init = './lua/tests/minimal_init.lua' }"
|
2021-09-07 12:39:02 +00:00
|
|
|
# - name: Get neovim nightly
|
|
|
|
# uses: actions/cache@v2
|
|
|
|
# with:
|
|
|
|
# path: |
|
|
|
|
# build/neovim/nightly
|
|
|
|
# key: ${{ runner.os }}-appimage-${{ hashFiles('todays-date') }}
|
|
|
|
# - name: Run Test on neovim nightly
|
|
|
|
# run: |
|
|
|
|
# test -d build/neovim/nightly || {
|
|
|
|
# mkdir -p build/neovim/nightly
|
|
|
|
# curl -Lo build/neovim/nightly/nvim https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage
|
|
|
|
# chmod +x build/neovim/nightly/nvim
|
|
|
|
# }
|
|
|
|
# build/neovim/nightly/nvim --headless -u lua/tests/minimal_init.lua -c "PlenaryBustedDirectory lua/tests/ { minimal_init = './lua/tests/minimal_init.lua' }"
|
2021-09-04 05:41:04 +00:00
|
|
|
- name: Lint
|
2021-05-05 18:04:16 +00:00
|
|
|
run: |
|
2021-09-04 05:41:04 +00:00
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install luarocks
|
|
|
|
sudo luarocks install luacheck
|
|
|
|
luacheck lua/
|
|
|
|
luacheck examples/
|