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:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
|
env:
|
||||||
|
NVIM_VERSION: v0.9.4
|
||||||
|
LUALS_VERSION: 3.7.3
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -26,7 +30,7 @@ jobs:
|
|||||||
- name: luacheck
|
- name: luacheck
|
||||||
run: |
|
run: |
|
||||||
luarocks install luacheck 1.1.1
|
luarocks install luacheck 1.1.1
|
||||||
luacheck lua
|
make lint
|
||||||
|
|
||||||
style:
|
style:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -40,22 +44,16 @@ jobs:
|
|||||||
version: "0.19"
|
version: "0.19"
|
||||||
args: --check lua
|
args: --check lua
|
||||||
|
|
||||||
- name: doc-comments
|
|
||||||
run: ./scripts/doc-comments.sh
|
|
||||||
|
|
||||||
check:
|
check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
env:
|
|
||||||
LUALS_VERSION: 3.7.3
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: rhysd/action-setup-vim@v1
|
- uses: rhysd/action-setup-vim@v1
|
||||||
with:
|
with:
|
||||||
neovim: true
|
neovim: true
|
||||||
version: v0.9.4
|
version: $NVIM_VERSION
|
||||||
|
|
||||||
- name: install
|
- name: install
|
||||||
run: |
|
run: |
|
||||||
@@ -64,4 +62,4 @@ jobs:
|
|||||||
|
|
||||||
- name: lua-language-server --check
|
- name: lua-language-server --check
|
||||||
run: |
|
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-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