From 50e2e308ed4f3d6c500785afdcc494dbd26bfac9 Mon Sep 17 00:00:00 2001 From: MisanthropicBit Date: Wed, 27 Nov 2024 10:21:25 +0100 Subject: [PATCH] WIP + rebase [skip ci] --- .github/workflows/tests.yml | 16 +++++----------- tests/minimal_init.lua | 3 ++- winmove.nvim-scm-1.rockspec | 8 ++++++-- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 69de6ba..237925c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -23,20 +23,14 @@ jobs: with: path: _neovim key: ${{ runner.os }}-x64-${{ hashFiles('todays-date') }} - - name: Install test dependencies - run: | - git clone --depth 1 https://github.com/MisanthropicBit/neotest-busted ~/.local/share/nvim/site/pack/start/neotest-busted - git clone --depth 1 https://github.com/nvim-neotest/neotest ~/.local/share/nvim/site/pack/start/neotest - git clone --depth 1 https://github.com/nvim-neotest/nvim-nio ~/.local/share/nvim/site/pack/start/nvim-nio - git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/start/plenary.nvim - ln -s "$(pwd)" ~/.local/share/nvim/site/pack/start - name: Setup neovim uses: rhysd/action-setup-vim@v1 with: neovim: true version: ${{ matrix.neovim_version }} - name: Run tests - if: ${{ matrix.neovim_version != 'v0.8.0' }} - run: nvim -l ~/.local/share/nvim/site/pack/start/neotest-busted/scripts/test-runner.lua - if: ${{ matrix.neovim_version == 'v0.8.0' }} - run: nvim -u NONE -i NONE -n --headless -c 'source ~/.local/share/nvim/site/pack/start/neotest-busted/scripts/test-runner.lua' -c quitall + - uses: leafo/gh-actions-luarocks@v4.0.0 + run: | + luarocks init + luarocks config --scope project lua_version 5.1 + luarocks test diff --git a/tests/minimal_init.lua b/tests/minimal_init.lua index c76073e..8db925e 100644 --- a/tests/minimal_init.lua +++ b/tests/minimal_init.lua @@ -1,3 +1,4 @@ vim.opt.rtp:append(".") -vim.opt.rtp:append("~/.vim-plug/plenary.nvim") +vim.opt.rtp:append("./lua_modules/lua/plenary.nvim") + vim.cmd.runtime({ "plugin/plenary.vim", bang = true }) diff --git a/winmove.nvim-scm-1.rockspec b/winmove.nvim-scm-1.rockspec index c621938..53f9ac9 100644 --- a/winmove.nvim-scm-1.rockspec +++ b/winmove.nvim-scm-1.rockspec @@ -34,7 +34,11 @@ build = { }, } +test_dependencies = { + "busted >= 2.2.0", + "neotest-busted >= 0.3.0", +} + test = { - type = "command", - command = "./tests/run_tests.sh", + type = "busted", }