Skip to content

Commit 4cc1bc1

Browse files
authored
Merge pull request #4 from vinibispo/feat/add-commit-action-on-github-actions
Feat/add commit action on GitHub actions
2 parents 32b53cb + 0b97548 commit 4cc1bc1

File tree

3 files changed

+19
-9
lines changed

3 files changed

+19
-9
lines changed

.github/workflows/default.yml

+9-6
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,22 @@ jobs:
1111
name: test
1212
steps:
1313
- name: checkout
14-
uses: actions/checkout@v2
14+
uses: actions/checkout@v4
1515

1616
- uses: rhysd/action-setup-vim@v1
1717
with:
1818
neovim: true
1919
version: ${{ matrix.nvim-versions }}
2020

21-
- name: Lua action
22-
uses: mileschou/lua-action@master
23-
with:
24-
args: lua -v
25-
2621
- name: run tests
22+
# When we run make test we are running install and compile too
2723
run: make test
2824
env:
2925
PLENARY_DIR: vendor/plenary.nvim
26+
27+
28+
- name: Commit
29+
uses: stefanzweifel/git-auto-commit-action@v5
30+
with:
31+
commit_message: 'auto: generate lua files'
32+
file_pattern: '*.lua'

Makefile

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
FENNEL_SCRIPT=scripts/fennel
21
TESTS_INIT=tests/minimal_init.lua
32
TESTS_DIR=tests/
43

@@ -9,13 +8,17 @@ test_files =$(wildcard tests/**/*.ts)
98
test_out_files = $(test_files:tests/%.ts=tests/%.lua)
109
test_out_init = $(test_init:tests/%.ts=tests/%.lua)
1110

12-
compile:
11+
12+
compile: node_modules
1313
mkdir -p lua/forem-nvim
1414
npx tstl
1515
npx tstl -p plugin/tsconfig.json
1616
npx tstl -p tests/tsconfig.json
1717

18-
test:
18+
node_modules: package.json
19+
@test -d node_modules || npm clean-install
20+
21+
test: compile
1922
@nvim \
2023
--headless \
2124
--noplugin \

lua/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# About
2+
Contains transpiled output from [src](../src) dir
3+
4+
DON'T make direct changes to lua files since they will be deleted by build runner.

0 commit comments

Comments
 (0)