chore: coverage config
This commit is contained in:
parent
4dd8d433f4
commit
c000af88c5
47
.luacov
47
.luacov
|
@ -1,46 +1,17 @@
|
||||||
-- -- Per https://github.com/lunarmodules/luacov/blob/c915f4b95e8df5dbfaf2b1f04f0b7da04506fc7a/src/luacov/reporter.lua#L102
|
|
||||||
-- -- > The option includeuntestedfiles requires the lfs module (from luafilesystem) to be installed.
|
|
||||||
-- -- So I'm ok with including it here, since it's already an hard dependency.
|
|
||||||
-- local lfs = require "lfs"
|
|
||||||
|
|
||||||
-- local function walk(dir, callback)
|
|
||||||
-- for file in lfs.dir(dir) do
|
|
||||||
-- if file ~= "." and file ~= ".." then
|
|
||||||
-- local path = dir .. "/" .. file
|
|
||||||
-- local attr = lfs.attributes(path)
|
|
||||||
-- if attr.mode == "directory" then
|
|
||||||
-- walk(path, callback)
|
|
||||||
-- else
|
|
||||||
-- callback(path)
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
|
|
||||||
-- local teal_files = {}
|
|
||||||
-- for _, path in pairs { "spec", "src" } do
|
|
||||||
-- walk(path, function(file)
|
|
||||||
-- if file:match "%.tl$" then
|
|
||||||
-- table.insert(teal_files, file)
|
|
||||||
-- end
|
|
||||||
-- end)
|
|
||||||
-- end
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
statsfile = "luacov/luacov.stats.out",
|
statsfile = "luacov/luacov.stats.out",
|
||||||
reporter = "html",
|
reporter = "html",
|
||||||
reportfile = "luacov/luacov.report.html",
|
reportfile = "luacov/luacov.report.html",
|
||||||
include = {
|
includeuntestedfiles = {
|
||||||
"spec",
|
"src/",
|
||||||
"src",
|
|
||||||
},
|
},
|
||||||
exclude = {
|
exclude = {
|
||||||
"lua_modules",
|
"^/",
|
||||||
"spec/tlconfig.lua",
|
"lua_modules/",
|
||||||
"src/awesome.d.tl/types",
|
"spec/",
|
||||||
"types",
|
"tlconfig",
|
||||||
|
"types/",
|
||||||
},
|
},
|
||||||
-- runreport = true, -- For some reason, it makes my computer crash
|
-- runreport = true,
|
||||||
-- includeuntestedfiles = teal_files,
|
-- deletestats = true,
|
||||||
includeuntestedfiles = true,
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
"awesomewm",
|
"awesomewm",
|
||||||
"buildx",
|
"buildx",
|
||||||
"concat",
|
"concat",
|
||||||
|
"deletestats",
|
||||||
"dryrun",
|
"dryrun",
|
||||||
"getcontent",
|
"getcontent",
|
||||||
"gitea",
|
"gitea",
|
||||||
|
@ -43,6 +44,7 @@
|
||||||
"sublist",
|
"sublist",
|
||||||
"tablex",
|
"tablex",
|
||||||
"tbody",
|
"tbody",
|
||||||
|
"tlconfig",
|
||||||
"tmpl",
|
"tmpl",
|
||||||
"wibox",
|
"wibox",
|
||||||
"woodpeckerci",
|
"woodpeckerci",
|
||||||
|
|
2
justfile
2
justfile
|
@ -52,5 +52,5 @@ test PATTERN="_spec":
|
||||||
|
|
||||||
# Requires a patched version of luacov (https://github.com/lunarmodules/luacov/issues/98#issuecomment-1530491759)
|
# Requires a patched version of luacov (https://github.com/lunarmodules/luacov/issues/98#issuecomment-1530491759)
|
||||||
coverage:
|
coverage:
|
||||||
busted --coverage
|
busted --run=coverage
|
||||||
luacov
|
luacov
|
||||||
|
|
Loading…
Reference in New Issue