chore: coverage config
ci/woodpecker/pr/docker-build Pipeline was successful Details
ci/woodpecker/pr/lint Pipeline was successful Details
ci/woodpecker/pr/build Pipeline was successful Details
ci/woodpecker/pr/test Pipeline was successful Details

This commit is contained in:
Aire-One 2023-08-03 23:55:32 +02:00
parent 4dd8d433f4
commit c000af88c5
3 changed files with 12 additions and 39 deletions

47
.luacov
View File

@ -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 {
statsfile = "luacov/luacov.stats.out",
reporter = "html",
reportfile = "luacov/luacov.report.html",
include = {
"spec",
"src",
includeuntestedfiles = {
"src/",
},
exclude = {
"lua_modules",
"spec/tlconfig.lua",
"src/awesome.d.tl/types",
"types",
"^/",
"lua_modules/",
"spec/",
"tlconfig",
"types/",
},
-- runreport = true, -- For some reason, it makes my computer crash
-- includeuntestedfiles = teal_files,
includeuntestedfiles = true,
-- runreport = true,
-- deletestats = true,
}

View File

@ -12,6 +12,7 @@
"awesomewm",
"buildx",
"concat",
"deletestats",
"dryrun",
"getcontent",
"gitea",
@ -43,6 +44,7 @@
"sublist",
"tablex",
"tbody",
"tlconfig",
"tmpl",
"wibox",
"woodpeckerci",

View File

@ -52,5 +52,5 @@ test PATTERN="_spec":
# Requires a patched version of luacov (https://github.com/lunarmodules/luacov/issues/98#issuecomment-1530491759)
coverage:
busted --coverage
busted --run=coverage
luacov