From 77276a37b17e4d599f923653104700445e358467 Mon Sep 17 00:00:00 2001 From: tris203 Date: Tue, 21 May 2024 22:38:29 +0100 Subject: [PATCH 1/8] ci: check types --- .github/workflows/.checkluarc.json | 18 ++++++++++++++++++ .github/workflows/typecheck.yml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 .github/workflows/.checkluarc.json create mode 100644 .github/workflows/typecheck.yml diff --git a/.github/workflows/.checkluarc.json b/.github/workflows/.checkluarc.json new file mode 100644 index 0000000..91febd2 --- /dev/null +++ b/.github/workflows/.checkluarc.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json", + "runtime.version": "LuaJIT", + "runtime.path": [ + "lua/?.lua", + "lua/?/init.lua" + ], + "Lua.workspace.library": [ + "/github/workspace/deps/neodev.nvim/types/stable" + "${3rd}/busted/library" + ], + "Lua.diagnostics.libraryFiles": "Disable", + "Lua.workspace.checkThirdParty": "Disable", + "diagnostics.globals": [ + "describe", + "it", + ] +} diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml new file mode 100644 index 0000000..5e2d898 --- /dev/null +++ b/.github/workflows/typecheck.yml @@ -0,0 +1,30 @@ +--- +name: lua_ls-typecheck +on: + pull_request: ~ + push: + branches: + - '*' + +jobs: + build: + name: Type Check Code Base + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Checkout dependency neodev + uses: actions/checkout@v3 + with: + repository: "folke/neodev.nvim" + path: "deps/neodev.nvim" + + - name: Type Check Code Base + uses: mrcjkb/lua-typecheck-action@v0.1.2 + with: + configpath: .github/workflows/.checkluarc.json + directories: | + lua + tests From 071ae300c7afb2b125557f157f3b230bb0d3d9c9 Mon Sep 17 00:00:00 2001 From: tris203 Date: Tue, 21 May 2024 22:45:58 +0100 Subject: [PATCH 2/8] ci: fix --- .github/workflows/.checkluarc.json | 6 +----- .github/workflows/typecheck.yml | 12 +++++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/.checkluarc.json b/.github/workflows/.checkluarc.json index 91febd2..92d4df2 100644 --- a/.github/workflows/.checkluarc.json +++ b/.github/workflows/.checkluarc.json @@ -7,12 +7,8 @@ ], "Lua.workspace.library": [ "/github/workspace/deps/neodev.nvim/types/stable" - "${3rd}/busted/library" + "/github/workspace/deps/neodev.nvim/types/nightly" ], "Lua.diagnostics.libraryFiles": "Disable", "Lua.workspace.checkThirdParty": "Disable", - "diagnostics.globals": [ - "describe", - "it", - ] } diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index 5e2d898..da25156 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -1,10 +1,13 @@ --- name: lua_ls-typecheck + on: - pull_request: ~ push: branches: - - '*' + - "main" + pull_request: + branches: + - "main" jobs: build: @@ -13,10 +16,10 @@ jobs: steps: - name: Checkout Code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Checkout dependency neodev - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: "folke/neodev.nvim" path: "deps/neodev.nvim" @@ -27,4 +30,3 @@ jobs: configpath: .github/workflows/.checkluarc.json directories: | lua - tests From 61b78eb6b8956be00eddc2846d237360638ea35f Mon Sep 17 00:00:00 2001 From: tris203 Date: Tue, 21 May 2024 22:57:25 +0100 Subject: [PATCH 3/8] ci: sparse --- .github/workflows/.checkluarc.json | 4 ---- .github/workflows/typecheck.yml | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/.checkluarc.json b/.github/workflows/.checkluarc.json index 92d4df2..c7223bc 100644 --- a/.github/workflows/.checkluarc.json +++ b/.github/workflows/.checkluarc.json @@ -5,10 +5,6 @@ "lua/?.lua", "lua/?/init.lua" ], - "Lua.workspace.library": [ - "/github/workspace/deps/neodev.nvim/types/stable" - "/github/workspace/deps/neodev.nvim/types/nightly" - ], "Lua.diagnostics.libraryFiles": "Disable", "Lua.workspace.checkThirdParty": "Disable", } diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index da25156..5e785d3 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -22,7 +22,8 @@ jobs: uses: actions/checkout@v4 with: repository: "folke/neodev.nvim" - path: "deps/neodev.nvim" + sparse-checkout: | + types - name: Type Check Code Base uses: mrcjkb/lua-typecheck-action@v0.1.2 From cd9694bb111542d9f1379f4cc8d6753399679af8 Mon Sep 17 00:00:00 2001 From: tris203 Date: Tue, 21 May 2024 23:01:12 +0100 Subject: [PATCH 4/8] ci: json comma --- .github/workflows/.checkluarc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/.checkluarc.json b/.github/workflows/.checkluarc.json index c7223bc..1c238b0 100644 --- a/.github/workflows/.checkluarc.json +++ b/.github/workflows/.checkluarc.json @@ -6,5 +6,5 @@ "lua/?/init.lua" ], "Lua.diagnostics.libraryFiles": "Disable", - "Lua.workspace.checkThirdParty": "Disable", + "Lua.workspace.checkThirdParty": "Disable" } From 82ccd8baac4d8ec9b96eb60a695297f6d6b98960 Mon Sep 17 00:00:00 2001 From: tris203 Date: Tue, 21 May 2024 23:08:16 +0100 Subject: [PATCH 5/8] ci: take whatever --- .github/workflows/.checkluarc.json | 5 +++++ .github/workflows/typecheck.yml | 1 + 2 files changed, 6 insertions(+) diff --git a/.github/workflows/.checkluarc.json b/.github/workflows/.checkluarc.json index 1c238b0..6681936 100644 --- a/.github/workflows/.checkluarc.json +++ b/.github/workflows/.checkluarc.json @@ -5,6 +5,11 @@ "lua/?.lua", "lua/?/init.lua" ], + "Lua.workspace.library": [ + "/github/workspace/deps/neodev.nvim/types/stable", + "/github/workspace/deps/neodev.nvim/types/nightly", + "${3rd}/busted/library" + ], "Lua.diagnostics.libraryFiles": "Disable", "Lua.workspace.checkThirdParty": "Disable" } diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index 5e785d3..df727fc 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -22,6 +22,7 @@ jobs: uses: actions/checkout@v4 with: repository: "folke/neodev.nvim" + path: "deps.neodev.nvim" sparse-checkout: | types From 0befab9986c054c0dedc373b344dc2316d5c8f44 Mon Sep 17 00:00:00 2001 From: tris203 Date: Tue, 21 May 2024 23:18:39 +0100 Subject: [PATCH 6/8] ci: now? --- .github/workflows/{.checkluarc.json => .luarc.json} | 0 .github/workflows/typecheck.yml | 6 ++---- 2 files changed, 2 insertions(+), 4 deletions(-) rename .github/workflows/{.checkluarc.json => .luarc.json} (100%) diff --git a/.github/workflows/.checkluarc.json b/.github/workflows/.luarc.json similarity index 100% rename from .github/workflows/.checkluarc.json rename to .github/workflows/.luarc.json diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index df727fc..ee3500e 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -22,13 +22,11 @@ jobs: uses: actions/checkout@v4 with: repository: "folke/neodev.nvim" - path: "deps.neodev.nvim" - sparse-checkout: | - types + path: "deps/neodev.nvim" - name: Type Check Code Base uses: mrcjkb/lua-typecheck-action@v0.1.2 with: - configpath: .github/workflows/.checkluarc.json + configpath: .github/workflows/.luarc.json directories: | lua From d9d01c4cc82997385c68eb24253402c0fa43fd0c Mon Sep 17 00:00:00 2001 From: tris203 Date: Tue, 21 May 2024 23:45:52 +0100 Subject: [PATCH 7/8] ci: is hard --- .github/workflows/.luarc.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/.luarc.json b/.github/workflows/.luarc.json index 6681936..fabd0a0 100644 --- a/.github/workflows/.luarc.json +++ b/.github/workflows/.luarc.json @@ -6,6 +6,7 @@ "lua/?/init.lua" ], "Lua.workspace.library": [ + "/github/workspace/", "/github/workspace/deps/neodev.nvim/types/stable", "/github/workspace/deps/neodev.nvim/types/nightly", "${3rd}/busted/library" From 8882bc8737b2db889b01452368dd38b395a74d8e Mon Sep 17 00:00:00 2001 From: tris203 Date: Wed, 22 May 2024 23:01:14 +0100 Subject: [PATCH 8/8] ci: ? --- .github/workflows/.luarc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/.luarc.json b/.github/workflows/.luarc.json index fabd0a0..66934f5 100644 --- a/.github/workflows/.luarc.json +++ b/.github/workflows/.luarc.json @@ -6,7 +6,7 @@ "lua/?/init.lua" ], "Lua.workspace.library": [ - "/github/workspace/", + "/github/workspace", "/github/workspace/deps/neodev.nvim/types/stable", "/github/workspace/deps/neodev.nvim/types/nightly", "${3rd}/busted/library"