From c8c754cd4b08ceea3b98c97c822b8a9cdce20e84 Mon Sep 17 00:00:00 2001 From: vinibispo Date: Fri, 8 Mar 2024 14:51:33 -0300 Subject: [PATCH] fix(workflow): trying to fix workflow --- .github/workflows/default.yml | 17 ++++++++--------- Makefile | 10 ++++++---- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index b96eff4..d8921e5 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -11,23 +11,22 @@ jobs: name: test steps: - name: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - uses: rhysd/action-setup-vim@v1 with: neovim: true version: ${{ matrix.nvim-versions }} - - name: Lua action - uses: mileschou/lua-action@master - with: - args: lua -v + - name: run tests + # When we run make test we are running install and compile too + run: make test + env: + PLENARY_DIR: vendor/plenary.nvim - - name: Build - run: make - name: Commit - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: 'auto: generate lua files' - file_pattern: lua + file_pattern: '*.lua' diff --git a/Makefile b/Makefile index 8b113e6..98f562b 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,3 @@ -FENNEL_SCRIPT=scripts/fennel TESTS_INIT=tests/minimal_init.lua TESTS_DIR=tests/ @@ -9,17 +8,20 @@ test_files =$(wildcard tests/**/*.ts) test_out_files = $(test_files:tests/%.ts=tests/%.lua) test_out_init = $(test_init:tests/%.ts=tests/%.lua) -compile: +install: + npm ci + +compile: install mkdir -p lua/forem-nvim npx tstl npx tstl -p plugin/tsconfig.json npx tstl -p tests/tsconfig.json -test: +test: compile @nvim \ --headless \ --noplugin \ -u ${TESTS_INIT} \ -c "PlenaryBustedDirectory ${TESTS_DIR} { minimal_init = '${TESTS_INIT}' }" -.PHONY: test compile +.PHONY: install test compile