generated from nvim-treesitter/module-template
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Taskfile.yml
75 lines (59 loc) · 1.76 KB
/
Taskfile.yml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# https://taskfile.dev
version: "3"
tasks:
default:
- task: test
test:
silent: true
sources:
- "lua/**/*.lua"
- "tests/**/*.lua"
cmd: luarocks test {{.CLI_ARGS}}
nvim:
interactive: true
env:
XDG_CONFIG_HOME: ".tests/xdg/config/"
XDG_STATE_HOME: ".tests/xdg/local/state/"
XDG_DATA_HOME: ".tests/xdg/local/share/"
cmd: nvim -u ./tests/init.lua
plug.add:
desc: "Add a plugin to the pack directory, usage: task plug.add [start=URL] [opt=URL]"
aliases: [pa]
vars:
plug_dir: ".tests/xdg/local/share/nvim/site/pack/testing/start"
start: '{{default .start ""}}'
opt: '{{default .opt ""}}'
cmd: |
start={{shellQuote .start}}
opt={{shellQuote .opt}}
kind=""
url=""
if [ -n "$start" ]; then
kind="start"
url="$start"
elif [ -n "$opt" ]; then
kind="opt"
url="$opt"
fi
basename="$(basename "$url")"
path=".tests/xdg/local/share/nvim/site/pack/testing/$kind/$basename"
git submodule add --force --depth 1 "$url" "$path"
install:
aliases: [i]
cmd: luarocks install --force --pin --deps-mode=one --tree=lua_modules --only-deps nvim-treeclimber-dev-1.rockspec
install:test:
aliases: [it]
cmd: luarocks --tree=lua_modules test --prepare ./nvim-treeclimber-dev-1.rockspec
lint:
cmd: selene .
lint.luasp:
silent: true
vars:
pager:
sh: command -v tspin || command -v less
env:
VIMRUNTIME:
sh: nvim --clean --headless --cmd 'echo $VIMRUNTIME|q' 2>&1 1>/dev/null
cmds:
- ./.tests/xdg/local/share/nvim/mason/bin/lua-language-server --check . --logpath=.tmp
- ./tests/nvim -l ./tests/lualsp-report.lua .tmp/check.json | {{.pager}}