-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmakefile
More file actions
25 lines (19 loc) · 766 Bytes
/
Copy pathmakefile
File metadata and controls
25 lines (19 loc) · 766 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Makefile for gh_dash.nvim testing and coverage
# Usage:
# make test - run unit tests
# make coverage - run tests + generate coverage (luacov + lcov.info)
# Force correct Lua version for Neovim (Lua 5.1)
LUAROCKS_ENV = eval "$(luarocks --lua-version=5.1 path)"
# Headless Neovim test runner
NVIM_TEST_CMD = nvim --headless -u tests/minimal_init.lua -c "PlenaryBustedDirectory tests/"
.PHONY: test coverage clean
test:
$(LUAROCKS_ENV) && $(NVIM_TEST_CMD)
coverage:
$(LUAROCKS_ENV) && nvim --headless -u tests/minimal_init.lua -c "luafile tests/run_cov.lua"
ls -lh luacov.stats.out
$(LUAROCKS_ENV) && luacov -t LcovReporter
@echo "Generated coverage report: lcov.info"
clean:
rm -f luacov.stats.out lcov.info
@echo "Cleaned coverage artifacts"