Feat: Add Basic Lua Test Suite (#115)
This MR adds a Lua test suite to the project, run via busted, and introduces tests for a number of the utility functions. Subsequent work will have to be done to test functions that use the `vim.api` scope and external packages to the plugin.
This commit is contained in:
committed by
GitHub
parent
1abc33d149
commit
88b9196a2e
37
.github/workflows/lua.yaml
vendored
Normal file
37
.github/workflows/lua.yaml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: Lua
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
jobs:
|
||||
lua_lint:
|
||||
name: Lint Lua 💅
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Luacheck linter
|
||||
uses: lunarmodules/luacheck@v1
|
||||
with:
|
||||
args: --globals vim --no-max-line-length -- .
|
||||
lua_format:
|
||||
name: Formatting Lua 💅
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Action
|
||||
uses: JohnnyMorganz/stylua-action@v3
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: latest
|
||||
args: --check .
|
||||
lua_test:
|
||||
name: Test Lua 🧪
|
||||
needs: [lua_format,lua_lint]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Run Busted
|
||||
uses: lunarmodules/busted@v2.2.0
|
||||
Reference in New Issue
Block a user