Skip to content

Commit

Permalink
ci: fix stylua installation
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasYOY committed Jun 22, 2024
1 parent eb20d62 commit b72c202
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/check-lua.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ jobs:
- name: Prepare
run: |
sudo apt-get update
sudo apt-get install -y rustc
sudo cargo install stylua
sudo apt install -y nodejs npm
- name: Lint
run: make lint_stylua
run: "make lint_stylua"
env:
STULUA: "npx @johnnymorganz/stylua-bin"
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
all: format lint test

STYLUA ?= stylua

.PHONY: test
test:
nvim --headless -u scripts/minimal_init.lua -c "PlenaryBustedDirectory lua { minimal_init='./scripts/minimal_init.lua', sequential=true, }"

.PHONY: lint_stylua
lint_stylua:
stylua --color always --check lua
${STYLUA} --color always --check lua

.PHONY: lint_luacheck
lint_luacheck:
Expand All @@ -17,5 +19,5 @@ lint: lint_luacheck lint_stylua

.PHONY: format
format:
stylua lua
${STYLUA} lua

0 comments on commit b72c202

Please sign in to comment.