From a4fc0b5e66bb4ead90b7a0ba97423e4e0f3f5bcc Mon Sep 17 00:00:00 2001 From: vinibispo Date: Tue, 28 Jun 2022 09:37:26 -0300 Subject: [PATCH 1/7] docs(README): add warning about README --- lua/README.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 lua/README.md diff --git a/lua/README.md b/lua/README.md new file mode 100644 index 0000000..2b34d07 --- /dev/null +++ b/lua/README.md @@ -0,0 +1,4 @@ +# About +Contains compiled output from [fennel](../fnl) dir + +DON'T make direct changes to lua files since they will be deleted by build runner. From c4fef8918fc5d900eefda3d9ec0ed203a1f4ad19 Mon Sep 17 00:00:00 2001 From: vinibispo Date: Tue, 28 Jun 2022 09:47:22 -0300 Subject: [PATCH 2/7] ci(github): add an action for committing and remove test action, meanwhile --- .github/workflows/default.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 8498ef8..06df687 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -23,7 +23,8 @@ jobs: with: args: lua -v - - name: run tests - run: make test - env: - PLENARY_DIR: vendor/plenary.nvim + - name: Commit + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: 'auto: run build steps' + file_pattern: lua From 532ef68a11c08cd1a4a1e1274f433077b2adb93a Mon Sep 17 00:00:00 2001 From: vinibispo Date: Tue, 28 Jun 2022 09:54:13 -0300 Subject: [PATCH 3/7] fix(ci): add missing make command --- .github/workflows/default.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 06df687..cf61afc 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -23,6 +23,9 @@ jobs: with: args: lua -v + - name: Build + run: make + - name: Commit uses: stefanzweifel/git-auto-commit-action@v4 with: From 8ebbdbf4465db2092c4c075a9ba21ce19e4871b2 Mon Sep 17 00:00:00 2001 From: vinibispo Date: Tue, 28 Jun 2022 10:01:08 -0300 Subject: [PATCH 4/7] fix(ci): change commit message --- .github/workflows/default.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index cf61afc..b96eff4 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -29,5 +29,5 @@ jobs: - name: Commit uses: stefanzweifel/git-auto-commit-action@v4 with: - commit_message: 'auto: run build steps' + commit_message: 'auto: generate lua files' file_pattern: lua From c8c754cd4b08ceea3b98c97c822b8a9cdce20e84 Mon Sep 17 00:00:00 2001 From: vinibispo Date: Fri, 8 Mar 2024 14:51:33 -0300 Subject: [PATCH 5/7] 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 From 2ee5252efc10d1b590b310b0b9b0b69b16fe8f41 Mon Sep 17 00:00:00 2001 From: vinibispo Date: Fri, 8 Mar 2024 16:03:12 -0300 Subject: [PATCH 6/7] docs: fix README.md documentation about the transpiled files --- lua/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/README.md b/lua/README.md index 2b34d07..bbcdcd9 100644 --- a/lua/README.md +++ b/lua/README.md @@ -1,4 +1,4 @@ # About -Contains compiled output from [fennel](../fnl) dir +Contains transpiled output from [src](../src) dir DON'T make direct changes to lua files since they will be deleted by build runner. From 0b97548a13bdc7b3be26b67b41e640bacc527831 Mon Sep 17 00:00:00 2001 From: vinibispo Date: Fri, 8 Mar 2024 16:05:53 -0300 Subject: [PATCH 7/7] fix(makefile): Do not run npm clean-install so many times --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 98f562b..f9986d5 100644 --- a/Makefile +++ b/Makefile @@ -8,15 +8,16 @@ test_files =$(wildcard tests/**/*.ts) test_out_files = $(test_files:tests/%.ts=tests/%.lua) test_out_init = $(test_init:tests/%.ts=tests/%.lua) -install: - npm ci -compile: install +compile: node_modules mkdir -p lua/forem-nvim npx tstl npx tstl -p plugin/tsconfig.json npx tstl -p tests/tsconfig.json +node_modules: package.json + @test -d node_modules || npm clean-install + test: compile @nvim \ --headless \ @@ -24,4 +25,4 @@ test: compile -u ${TESTS_INIT} \ -c "PlenaryBustedDirectory ${TESTS_DIR} { minimal_init = '${TESTS_INIT}' }" -.PHONY: install test compile +.PHONY: test compile