ci: add Makefile

This commit is contained in:
Alexander Courtis
2023-12-31 16:40:05 +11:00
parent 5e6511509c
commit 95b91463c0
3 changed files with 37 additions and 9 deletions

View File

@@ -11,6 +11,10 @@ on:
permissions:
contents: read
env:
NVIM_VERSION: v0.9.4
LUALS_VERSION: 3.7.3
jobs:
lint:
runs-on: ubuntu-latest
@@ -26,7 +30,7 @@ jobs:
- name: luacheck
run: |
luarocks install luacheck 1.1.1
luacheck lua
make lint
style:
runs-on: ubuntu-latest
@@ -40,22 +44,16 @@ jobs:
version: "0.19"
args: --check lua
- name: doc-comments
run: ./scripts/doc-comments.sh
check:
runs-on: ubuntu-latest
env:
LUALS_VERSION: 3.7.3
steps:
- uses: actions/checkout@v3
- uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: v0.9.4
version: $NVIM_VERSION
- name: install
run: |
@@ -64,4 +62,4 @@ jobs:
- name: lua-language-server --check
run: |
VIMRUNTIME=/home/runner/nvim-v0.9.4/share/nvim/runtime PATH="luals/bin:${PATH}" scripts/luals-check.sh
VIMRUNTIME=/home/runner/${NVIM_VERSION}/share/nvim/runtime PATH="luals/bin:${PATH}" make check

1
.gitignore vendored
View File

@@ -1 +1,2 @@
/luals-out/
/luals/

29
Makefile Normal file
View File

@@ -0,0 +1,29 @@
all: lint style check
#
# mandatory checks
#
lint:
luacheck -q lua
scripts/doc-comments.sh
style:
stylua lua --check
check:
scripts/luals-check.sh
#
# fixes
#
style-fix:
stylua lua
#
# utility
#
update-help:
scripts/update-help.sh
.PHONY: all style lint check style-fix update-help