ci: add Makefile
This commit is contained in:
16
.github/workflows/ci.yml
vendored
16
.github/workflows/ci.yml
vendored
@@ -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
1
.gitignore
vendored
@@ -1 +1,2 @@
|
||||
/luals-out/
|
||||
/luals/
|
||||
|
||||
29
Makefile
Normal file
29
Makefile
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user