mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-08-02 09:05:00 +02:00
ci: use lazy minit for tests
This commit is contained in:
parent
87fe403df6
commit
35f89fb3a1
1 changed files with 3 additions and 24 deletions
|
@ -1,26 +1,11 @@
|
|||
#!/usr/bin/env -S nvim -l
|
||||
|
||||
-- set stdpaths to use .tests
|
||||
local root = vim.fn.fnamemodify("./.tests", ":p")
|
||||
for _, name in ipairs({ "config", "data", "state", "cache" }) do
|
||||
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
|
||||
end
|
||||
|
||||
-- Bootstrap lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
vim.o.loadplugins = true -- enable since nvim -l disables plugins
|
||||
vim.env.LAZY_STDPATH = ".tests"
|
||||
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
|
||||
|
||||
-- Setup lazy.nvim
|
||||
require("lazy").setup({
|
||||
require("lazy.minit").busted({
|
||||
spec = {
|
||||
{ "LazyVim/LazyVim", dir = vim.fn.expand(".") },
|
||||
"lunarmodules/busted", -- add busted
|
||||
"LazyVim/starter",
|
||||
{ "nvim-lua/plenary.nvim" },
|
||||
{ "folke/lazy.nvim" },
|
||||
|
@ -28,10 +13,4 @@ require("lazy").setup({
|
|||
"williamboman/mason.nvim",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
rocks = { hererocks = true },
|
||||
})
|
||||
|
||||
-- run busted
|
||||
return pcall(require("busted.runner"), {
|
||||
standalone = false,
|
||||
}) or os.exit(1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue