From 69afd96c417e92aa17c4fb364392f066df0122f6 Mon Sep 17 00:00:00 2001 From: tris203 Date: Tue, 21 May 2024 22:38:29 +0100 Subject: [PATCH] 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