Merge pull request #153 from yochem/self-to-source #808
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: lua-ls Typecheck | |
on: | |
pull_request: ~ | |
push: | |
branches: | |
- '*' | |
jobs: | |
build: | |
name: lua-ls Typecheck | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Get latest neovim release tag | |
id: get_latest_neovim_tag | |
run: | | |
latest_tag=$(curl --silent "https://api.github.com/repos/neovim/neovim/tags" | jq -r '.[0].name') | |
echo "Latest tag: $latest_tag" | |
echo "::set-output name=latest_tag::$latest_tag" | |
- name: Checkout neovim for type annotations | |
uses: actions/checkout@v3 | |
with: | |
repository: "neovim/neovim" | |
path: "deps/neovim" | |
ref: ${{ steps.get_latest_neovim_tag.outputs.latest_tag }} | |
- name: Install luv luaCATS | |
uses: actions/checkout@v3 | |
with: | |
repository: "LuaCATS/luv" | |
path: "deps/luacats/luv" | |
- uses: leafo/gh-actions-lua@v9 # get luarocks dependencies for their types (eg `PathlibPath`) | |
with: | |
luaVersion: "5.1" | |
- uses: leafo/gh-actions-luarocks@v4 | |
- name: install dependencies | |
run: | | |
luarocks init | |
luarocks install --only-deps ./*.rockspec | |
- name: Type Check Code Base | |
uses: mrcjkb/[email protected] | |
with: | |
configpath: .github/workflows/.luarc.json | |
directories: | | |
lua |