69 lines
1.4 KiB
YAML
69 lines
1.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- '*'
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
env:
|
|
LUA_VERSION: "5.1"
|
|
NVIM_VERSION: "v0.9.4"
|
|
STYLUA_VERSION: "0.19.1"
|
|
LUALS_VERSION: "3.7.3"
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: leafo/gh-actions-lua@v10
|
|
with:
|
|
luaVersion: ${{ env.LUA_VERSION }}
|
|
|
|
- uses: leafo/gh-actions-luarocks@v4
|
|
|
|
- name: lint
|
|
run: |
|
|
luarocks install luacheck 1.1.1
|
|
make lint
|
|
|
|
style:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: style
|
|
uses: JohnnyMorganz/stylua-action@v3
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
version: ${{ env.STYLUA_VERSION }}
|
|
args: --check lua
|
|
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: rhysd/action-setup-vim@v1
|
|
with:
|
|
neovim: true
|
|
version: ${{ env.NVIM_VERSION }}
|
|
|
|
- name: install
|
|
run: |
|
|
mkdir -p luals
|
|
curl -L "https://github.com/LuaLS/lua-language-server/releases/download/${LUALS_VERSION}/lua-language-server-${LUALS_VERSION}-linux-x64.tar.gz" | tar zx --directory luals
|
|
|
|
- name: check
|
|
run: |
|
|
VIMRUNTIME=/home/runner/nvim-${NVIM_VERSION}/share/nvim/runtime PATH="luals/bin:${PATH}" make check
|
|
make help-check
|