Skip to content

Commit

Permalink
fix(workflow): trying to fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
vinibispo committed Mar 8, 2024
1 parent 8ebbdbf commit c8c754c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
FENNEL_SCRIPT=scripts/fennel
TESTS_INIT=tests/minimal_init.lua
TESTS_DIR=tests/

Expand All @@ -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

0 comments on commit c8c754c

Please sign in to comment.