Skip to content

Commit 54f70c7

Browse files
committed
ci: add luassert to minitest for now
1 parent 070418d commit 54f70c7

File tree

2 files changed

+24
-26
lines changed

2 files changed

+24
-26
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

+10-25
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ body:
66
- type: markdown
77
attributes:
88
value: |
9-
**Before** reporting an issue, make sure to read the [documentation](https://github.com/folke/lazy.nvim) and search [existing issues](https://github.com/folke/lazy.nvim/issues). Usage questions such as ***"How do I...?"*** belong in [Discussions](https://github.com/folke/lazy.nvim/discussions) and will be closed.
9+
**Before** reporting an issue, make sure to read the [documentation](https://github.com/folke/lazy.nvim)
10+
and search [existing issues](https://github.com/folke/lazy.nvim/issues).
11+
12+
Usage questions such as ***"How do I...?"*** belong in [Discussions](https://github.com/folke/lazy.nvim/discussions) and will be closed.
1013
- type: checkboxes
1114
attributes:
1215
label: Did you check docs and existing issues?
@@ -57,32 +60,14 @@ body:
5760
label: Repro
5861
description: Minimal `init.lua` to reproduce this issue. Save as `repro.lua` and run with `nvim -u repro.lua`
5962
value: |
60-
-- DO NOT change the paths and don't remove the colorscheme
61-
local root = vim.fn.fnamemodify("./.repro", ":p")
62-
63-
-- set stdpaths to use .repro
64-
for _, name in ipairs({ "config", "data", "state", "cache" }) do
65-
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
66-
end
63+
vim.env.LAZY_STDPATH = ".repro"
64+
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
6765
68-
-- bootstrap lazy
69-
local lazypath = root .. "/plugins/lazy.nvim"
70-
if not vim.loop.fs_stat(lazypath) then
71-
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
72-
end
73-
vim.opt.runtimepath:prepend(lazypath)
74-
75-
-- install plugins
76-
local plugins = {
77-
"folke/tokyonight.nvim",
78-
-- add any other plugins here
79-
}
80-
require("lazy").setup(plugins, {
81-
root = root .. "/plugins",
66+
require("lazy.minit").repro({
67+
spec = {
68+
-- add any other plugins here
69+
},
8270
})
83-
84-
vim.cmd.colorscheme("tokyonight")
85-
-- add anything else here
8671
render: Lua
8772
validations:
8873
required: false

lua/lazy/minit.lua

+14-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ function M.setup(opts)
2525
opts = M.extend({
2626
local_spec = false,
2727
change_detection = { enabled = false },
28+
dev = {
29+
patterns = vim.env.LAZY_DEV and vim.split(vim.env.LAZY_DEV, ",") or nil,
30+
},
2831
}, opts)
2932

3033
local args = {}
@@ -121,17 +124,27 @@ function M.minitest.run()
121124
is_not = {
122125
same = expect.no_equality,
123126
},
127+
is_not_nil = function(a)
128+
return expect.no_equality(nil, a)
129+
end,
130+
is_true = function(a)
131+
return expect.equality(true, a)
132+
end,
133+
is_false = function(a)
134+
return expect.equality(false, a)
135+
end,
124136
}
125137
Assert.__index = Assert
126-
-- assert = require("luassert")
127138
assert = setmetatable({}, Assert)
139+
assert = require("luassert")
128140
require("mini.test").run()
129141
end
130142

131143
---@param opts LazyConfig
132144
function M.minitest.setup(opts)
133145
return M.extend({
134146
spec = {
147+
"lunarmodules/luassert",
135148
{
136149
"echasnovski/mini.test",
137150
opts = {

0 commit comments

Comments
 (0)