Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/add commit action on GitHub actions #4

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.