- Add CI workflows (format, lint, typecheck) - Add quality workflow - Add luarocks publishing workflow - Add pre-commit configuration - Add issue templates (bug report, feature request) - Add .editorconfig, .gitignore, .luarc.json - Add selene.toml and vim.toml for linting - Add luarocks rockspec - Rename .stylua.toml to stylua.toml
61 lines
1.4 KiB
YAML
61 lines
1.4 KiB
YAML
name: ci
|
|
on:
|
|
workflow_call:
|
|
pull_request:
|
|
branches: [main]
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
changes:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
lua: ${{ steps.changes.outputs.lua }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dorny/paths-filter@v3
|
|
id: changes
|
|
with:
|
|
filters: |
|
|
lua:
|
|
- 'lua/**'
|
|
- 'plugin/**'
|
|
- '*.lua'
|
|
- '.luarc.json'
|
|
- 'stylua.toml'
|
|
- 'selene.toml'
|
|
|
|
lua-format:
|
|
runs-on: ubuntu-latest
|
|
needs: changes
|
|
if: ${{ needs.changes.outputs.lua == 'true' }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: JohnnyMorganz/stylua-action@v4
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
version: 2.1.0
|
|
args: --check .
|
|
|
|
lua-lint:
|
|
runs-on: ubuntu-latest
|
|
needs: changes
|
|
if: ${{ needs.changes.outputs.lua == 'true' }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: NTBBloodbath/selene-action@v1.0.0
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
args: --display-style quiet .
|
|
|
|
lua-typecheck:
|
|
runs-on: ubuntu-latest
|
|
needs: changes
|
|
if: ${{ needs.changes.outputs.lua == 'true' }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: mrcjkb/lua-typecheck-action@v0
|
|
with:
|
|
checklevel: Warning
|
|
directories: lua
|
|
configpath: .luarc.json
|