-
-
Notifications
You must be signed in to change notification settings - Fork 3
Include dependencies headers with the `workspace.library` setting
Marc Jakobi edited this page Jan 6, 2024
·
3 revisions
Example for folke/neodev.nvim and busted:
- Create a dedicated
.luarc.jsonfile for the action in.github/workflows/.luarc.json.
// ./.github/workflows/.luarc.json
{
"$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"
}- Use
actions/checkoutorluarocks install --tree <path>to install the dependency into adepssubdirectory. - Point the
configpathinput to the dedicated.luarc.json.
# ./.github/workflows/lua_ls-typecheck.yml
# you could add `tests` folder at the end but it will raise errors for `describe, it, ...` anyways...
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/.luarc.json
directories: |
luaThanks @pysan3!