-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added general unittest + Python unittests
Added minor version bump to 2.18.0
- Loading branch information
1 parent
0daffce
commit b087072
Showing
8 changed files
with
981 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
on: [push, pull_request] | ||
name: test | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
nvim-versions: ['nightly'] | ||
name: test | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
|
||
- uses: rhysd/action-setup-vim@v1 | ||
with: | ||
neovim: true | ||
version: ${{ matrix.nvim-versions }} | ||
|
||
- name: run tests | ||
run: make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
TESTS_INIT=tests/minimal_init.lua | ||
TESTS_DIR=tests/ | ||
|
||
.PHONY: test | ||
|
||
documentation: | ||
nvim --headless --noplugin -u ./scripts/minimal_init.vim -c "lua MiniDoc.generate()" -c "qa!" | ||
|
||
tag: | ||
./scripts/generate_tag.sh | ||
|
||
test: | ||
@nvim \ | ||
--headless \ | ||
--noplugin \ | ||
-u ${TESTS_INIT} \ | ||
-c "PlenaryBustedDirectory ${TESTS_DIR} { minimal_init = '${TESTS_INIT}' }" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
local plugins = { | ||
["https://github.com/nvim-treesitter/nvim-treesitter"] = os.getenv("NVIM_TREESITTER_DIRECTORY") | ||
or "/tmp/nvim_treesitter", | ||
["https://github.com/nvim-lua/plenary.nvim"] = os.getenv("PLENARY_DIRECTORY") or "/tmp/plenary.nvim", | ||
} | ||
|
||
local tests_directory = vim.fn.fnamemodify(vim.fn.expand("<sfile>"), ":h") | ||
local plugin_root = vim.fn.fnamemodify(tests_directory, ":h") | ||
vim.opt.runtimepath:append(plugin_root) | ||
|
||
for url, directory in pairs(plugins) do | ||
if vim.fn.isdirectory(directory) == 0 then | ||
vim.fn.system({ "git", "clone", url, directory }) | ||
end | ||
|
||
vim.opt.runtimepath:append(directory) | ||
end | ||
|
||
vim.cmd("runtime plugin/plenary.vim") | ||
require("plenary.busted") | ||
|
||
vim.cmd("runtime plugin/nvim-treesitter.lua") | ||
|
||
-- Some tests require the Python parser | ||
vim.cmd([[TSInstallSync! python]]) | ||
|
||
require("neogen").setup({ snippet_engine = "nvim" }) |
Oops, something went wrong.