ci(lint): add missing dependencies, actually fail job on fail, and run on PRs to main
#255
Workflow file for this run
This file contains hidden or 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 Diagnostics | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| lua-ls-diagnostics: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Neovim | |
| run: | | |
| curl -L https://github.com/neovim/neovim/releases/download/v0.11.5/nvim-linux-x86_64.tar.gz -o /opt/nvim.tar.gz | |
| mkdir /opt/nvim | |
| tar xzf /opt/nvim.tar.gz -C /opt/nvim | |
| sudo ln -s /opt/nvim/bin/nvim /usr/local/bin/nvim | |
| - name: Clone lazydev.nvim | |
| run: git clone --depth=1 https://github.com/folke/lazydev.nvim /opt/lazydev.nvim | |
| - name: Generate Neovim types with lazydev | |
| run: | | |
| nvim --headless -c 'lua vim.opt.rtp:append("/opt/lazydev.nvim")' \ | |
| -c 'lua require("lazydev").setup({})' \ | |
| -c 'qa' | |
| - name: Install Lua Language Server | |
| run: | | |
| curl -L "https://github.com/LuaLS/lua-language-server/releases/download/3.15.0/lua-language-server-3.15.0-linux-x64.tar.gz" -o /opt/lls.tar.gz | |
| mkdir /opt/lls | |
| tar -xzf /opt/lls.tar.gz -C /opt/lls | |
| echo "/opt/lls/bin" >> $GITHUB_PATH | |
| - name: Clone snacks.nvim dependency | |
| run: git clone --depth=1 https://github.com/folke/snacks.nvim /opt/snacks.nvim | |
| - name: Clone blink.cmp dependency | |
| run: git clone --depth=1 https://github.com/Saghen/blink.cmp /opt/blink.cmp | |
| - name: Run Lua LS diagnostics | |
| run: | | |
| lua-language-server --configpath .luarc.ci.json --check=. |