Skip to content

Commit

Permalink
Merge pull request #4 from vinibispo/feat/add-commit-action-on-github…
Browse files Browse the repository at this point in the history
…-actions

Feat/add commit action on GitHub actions
  • Loading branch information
Massolari authored Mar 15, 2024
2 parents 32b53cb + 0b97548 commit 4cc1bc1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +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: Commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'auto: generate lua files'
file_pattern: '*.lua'
9 changes: 6 additions & 3 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,13 +8,17 @@ test_files =$(wildcard tests/**/*.ts)
test_out_files = $(test_files:tests/%.ts=tests/%.lua)
test_out_init = $(test_init:tests/%.ts=tests/%.lua)

compile:

compile: node_modules
mkdir -p lua/forem-nvim
npx tstl
npx tstl -p plugin/tsconfig.json
npx tstl -p tests/tsconfig.json

test:
node_modules: package.json
@test -d node_modules || npm clean-install

test: compile
@nvim \
--headless \
--noplugin \
Expand Down
4 changes: 4 additions & 0 deletions lua/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# About
Contains transpiled output from [src](../src) dir

DON'T make direct changes to lua files since they will be deleted by build runner.

0 comments on commit 4cc1bc1

Please sign in to comment.