-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
49 lines (37 loc) · 1.52 KB
/
Makefile
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
.SUFFIXES:
TESTFILES=options mappings API splits tabs integrations buffers colors autocmds scratchpad commands
all: documentation lint luals test
test:
make deps
nvim --version | head -n 1 && echo ''
nvim --headless --noplugin -u ./scripts/minimal_init.lua \
-c "lua MiniTest.run({ execute = { reporter = MiniTest.gen_reporter.stdout({ group_depth = 2 }) } })"
test-nightly:
bob use nightly
make test
$(addprefix test-, $(TESTFILES)): test-%:
nvim --version | head -n 1 && echo ''
nvim --headless --noplugin -u ./scripts/minimal_init.lua \
-c "lua MiniTest.run_file('tests/test_$*.lua', { execute = { reporter = MiniTest.gen_reporter.stdout({ group_depth = 2 }) } })"
deps:
./scripts/clone_deps.sh 1 || true
deps-lint:
luarocks install argparse --force
luarocks install luafilesystem --force
luarocks install lanes --force
luarocks install luacheck --force
test-ci: deps test
documentation:
nvim --headless --noplugin -u ./scripts/minimal_init.lua -c "lua require('mini.doc').generate()" -c "qa!"
documentation-ci: deps documentation
lint:
stylua . -g '*.lua' -g '!deps/' -g '!nightly/'
luacheck plugin/ lua/
luals-ci:
rm -rf .ci/lua-ls/log
lua-language-server --configpath .luarc.json --logpath .ci/lua-ls/log --check .
[ -f .ci/lua-ls/log/check.json ] && { cat .ci/lua-ls/log/check.json 2>/dev/null; exit 1; } || true
luals:
mkdir -p .ci/lua-ls
curl -sL "https://github.com/LuaLS/lua-language-server/releases/download/3.7.4/lua-language-server-3.7.4-darwin-x64.tar.gz" | tar xzf - -C "${PWD}/.ci/lua-ls"
make luals-ci