Files
u.nvim/mise.toml
Jonathan Apodaca ea56f380e7
Some checks failed
ci / ci (push) Failing after 23s
convert to mise
2026-01-18 21:53:30 -07:00

113 lines
2.7 KiB
TOML

################################################################################
## Tool Alias
################################################################################
[tool_alias]
gh_emmylua_check = "github:EmmyLuaLs/emmylua-analyzer-rust"
################################################################################
## Tools
################################################################################
[tools]
jq = "1.8.1"
lua = "5.1.5"
neovim = "0.11.5"
stylua = "2.3.1"
[tools.gh_emmylua_check]
version = "0.19.0"
[tools.gh_emmylua_check.platforms]
linux-x64 = { asset_pattern = "*_check-linux-x64*" }
macos-x64 = { asset_pattern = "*_check-darwin-x64*" }
macos-arm64 = { asset_pattern = "*_check-darwin-arm64*" }
################################################################################
# Env
################################################################################
[env]
ASDF_LUA_LUAROCKS_VERSION = "3.12.2"
_.source = { path = "./scripts/env.sh", tools = true }
################################################################################
# Tasks
################################################################################
[tasks]
lint = "emmylua_check --ignore '.prefix/**/*.*' ."
fmt = "stylua ."
"fmt:check" = "stylua --check ."
[tasks.test]
run = 'mise test:version 0.11.5'
[tasks."test:version:no-prep"]
hide = true
usage = '''
arg "<version>" help="The version of Neovim to test with"
'''
run = '''
echo
echo -----------------------------
echo -----------------------------
echo Neovim version=$usage_version
echo -----------------------------
echo -----------------------------
echo
./nvimv/nvimv install $usage_version
eval $(./nvimv/nvimv env $usage_version)
busted --verbose
'''
[tasks."test:version"]
depends = ["test:prepare"]
usage = '''
arg "<version>" help="The version of Neovim to test with"
'''
run = 'mise test:version:no-prep $usage_version'
[tasks."test:prepare"]
run = '''
# Install Lua test dependencies (busted, etc.):
luarocks test --prepare
echo
# Check that the nightly version of Neovim is not more than a day old:
if find .prefix -path '**/nightly/**/nvim' -mtime -1 2>/dev/null | grep -q .; then
echo "Neovim Nightly is up-to-date"
else
if ./nvimv/nvimv ls | grep nightly >/dev/null; then
./nvimv/nvimv upgrade nightly
else
./nvimv/nvimv install nightly
fi
fi
echo
'''
[tasks."test:all"]
depends = ["test:prepare"]
run = '''
VERSIONS="0.11.5 nightly"
for v in $VERSIONS; do
mise test:version:no-prep $v
done
'''
[tasks."test:coverage"]
depends = ["test:prepare"]
run = '''
rm -f ./luacov.*.*
busted --coverage --verbose
luacov
awk '/^Summary$/{flag=1;next} flag{print}' luacov.report.out
'''
[tasks.ci]
run = '''
mise run fmt:check
mise run lint
mise run test:all
'''