From f1059c658143528d6fd221d2e20847e434109a22 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 21 Jan 2022 17:55:42 +0100 Subject: [PATCH] Add integration pipeline Added woodpecker pipeline for linting and unit testing. --- .luacheckrc | 3 +++ .woodpecker.yml | 12 ++++++++++++ lua/test/files_spec.lua | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 .luacheckrc create mode 100644 .woodpecker.yml diff --git a/.luacheckrc b/.luacheckrc new file mode 100644 index 0000000..c8a3f4e --- /dev/null +++ b/.luacheckrc @@ -0,0 +1,3 @@ +globals = { + "vim", +} diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..2f9a185 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,12 @@ +# branches: main + +pipeline: + code_lint: + image: pipelinecomponents/luacheck + commands: + - luacheck lua/zettelkasten + + unit_tests: + image: imega/busted + commands: + - busted test -C lua diff --git a/lua/test/files_spec.lua b/lua/test/files_spec.lua index c5874a6..a627843 100644 --- a/lua/test/files_spec.lua +++ b/lua/test/files_spec.lua @@ -91,7 +91,7 @@ describe("get_all_files", function() end, fs_scandir_next = function() if #files == 0 then return nil end - local fname, ftype = table.unpack(table.remove(files)) + local fname, ftype = unpack(table.remove(files)) return fname, ftype end })