ci: setup stylua action
This commit is contained in:
parent
f1577f5c3e
commit
ced6e5ae1e
5 changed files with 21 additions and 8 deletions
13
.github/workflows/ci.yml
vendored
13
.github/workflows/ci.yml
vendored
|
|
@ -35,6 +35,19 @@ jobs:
|
||||||
- name: Run luacheck
|
- name: Run luacheck
|
||||||
run: luacheck .
|
run: luacheck .
|
||||||
|
|
||||||
|
stylua:
|
||||||
|
name: StyLua
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Run stylua
|
||||||
|
uses: JohnnyMorganz/stylua-action@1.0.0
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
args: --check .
|
||||||
|
|
||||||
clang-format:
|
clang-format:
|
||||||
name: Clang Format
|
name: Clang Format
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ end
|
||||||
controller.update = function(text)
|
controller.update = function(text)
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
window.set_items(controller.items(text))
|
window.set_items(controller.items(text))
|
||||||
vim.cmd("syntax clear IvyMatch")
|
vim.cmd "syntax clear IvyMatch"
|
||||||
vim.cmd("syntax match IvyMatch '[(" .. text .. ")]'")
|
vim.cmd("syntax match IvyMatch '[(" .. text .. ")]'")
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ libivy.ivy_init = function(dir)
|
||||||
ivy_c.ivy_init(dir)
|
ivy_c.ivy_init(dir)
|
||||||
end
|
end
|
||||||
|
|
||||||
libivy.ivy_cwd = function ()
|
libivy.ivy_cwd = function()
|
||||||
return ffi.string(ivy_c.ivy_cwd())
|
return ffi.string(ivy_c.ivy_cwd())
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,11 @@ it("should run a simple match", function(t)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it("should find a dot file", function (t)
|
it("should find a dot file", function(t)
|
||||||
local current_dir = libivy.ivy_cwd()
|
local current_dir = libivy.ivy_cwd()
|
||||||
local matches = libivy.ivy_files("ci.yml", current_dir);
|
local matches = libivy.ivy_files("ci.yml", current_dir)
|
||||||
|
|
||||||
if matches ~= ".github/workflows/ci.yml\n" then
|
if matches ~= ".github/workflows/ci.yml\n" then
|
||||||
t.error("Invalid matches: " .. matches)
|
t.error("Invalid matches: " .. matches)
|
||||||
end
|
end
|
||||||
end);
|
end)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue