-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
36 lines (26 loc) · 1.18 KB
/
justfile
File metadata and controls
36 lines (26 loc) · 1.18 KB
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
set shell := ["bash", "-cu"]
plenary_dir := ".deps/plenary.nvim"
test_init := "tests/minimal_init.lua"
bootstrap-test-deps:
mkdir -p .deps
if [ -d "{{plenary_dir}}/.git" ]; then git -C "{{plenary_dir}}" pull --ff-only; else git clone --depth 1 https://github.com/nvim-lua/plenary.nvim "{{plenary_dir}}"; fi
test: bootstrap-test-deps test-unit test-contract
test-unit jobs="4":
find tests/unit -name '*_spec.lua' -print0 | \
xargs -0 -n1 -P "{{jobs}}" bash -cu \
'CODEX_PLENARY_PATH="{{plenary_dir}}" nvim --headless -u "{{test_init}}" -c "PlenaryBustedFile $1" -c "qa"' _
test-contract:
CODEX_PLENARY_PATH="{{plenary_dir}}" nvim --headless -u "{{test_init}}" -c 'PlenaryBustedFile tests/contract/provider_contract_spec.lua' -c 'qa'
fmt:
stylua lua plugin tests
mdformat --number docs/ README.md
fmt-check:
stylua --check lua plugin tests
mdformat --number --check docs/ README.md
lint:
if [ -f selene.toml ]; then selene --config selene.toml lua plugin tests; else selene lua plugin tests; fi
pre-commit-install:
mise install aqua:pre-commit/pre-commit
mise exec -- pre-commit install --hook-type pre-commit --hook-type commit-msg
pre-commit-run:
mise exec -- pre-commit run --all-files