From f5313b219eccf4636d88d749504b0247f6d29bd5 Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Sat, 15 Jun 2024 08:39:28 +0200 Subject: [PATCH] feat: use Makefile --- .github/workflows/test.yml | 5 ++--- Makefile | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 Makefile diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1096ae61..b6fe3e07 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,7 +27,7 @@ jobs: git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim ln -s $(pwd) ~/.local/share/nvim/site/pack/vendor/start - name: Run tests - run: nvim --headless -c "PlenaryBustedDirectory tests {minimal_init = 'tests/minimal_init.lua', sequential = true}" + run: make test-lua go: runs-on: ubuntu-latest steps: @@ -38,5 +38,4 @@ jobs: with: go-version: 1.22 - name: Check tests - run: go test ./... - working-directory: ./tests/go + run: make test-go diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..a63e3d0e --- /dev/null +++ b/Makefile @@ -0,0 +1,17 @@ +TESTS_INIT=tests/minimal_init.lua +TESTS_DIR=tests/ + +.PHONY: test-lua +test-lua: + @nvim \ + --headless \ + --noplugin \ + -u ${TESTS_INIT} \ + -c "PlenaryBustedDirectory ${TESTS_DIR} { minimal_init = '${TESTS_INIT}' }" + +.PHONY: test-go +test-go: + @cd tests/go && go test -v ./... + +.PHONY: test +test: test-lua test-go