🔧 fix empty if #16
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: CI | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| nvim-version: ['v0.7.0', 'v0.8.0', 'v0.9.0', 'v0.10.0', 'stable'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Neovim | |
| run: | | |
| if [ "${{ matrix.nvim-version }}" = "stable" ]; then | |
| DOWNLOAD_URL="https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.appimage" | |
| else | |
| DOWNLOAD_URL="https://github.com/neovim/neovim/releases/download/${{ matrix.nvim-version }}/nvim.appimage" | |
| fi | |
| curl -L $DOWNLOAD_URL -o nvim.appimage | |
| chmod +x nvim.appimage | |
| # Extract AppImage instead of running directly | |
| ./nvim.appimage --appimage-extract | |
| sudo mv squashfs-root /usr/local/ | |
| sudo ln -sf /usr/local/squashfs-root/usr/bin/nvim /usr/local/bin/nvim | |
| - name: Install dependencies | |
| run: | | |
| mkdir -p ~/.local/share/nvim/site/pack/deps/start | |
| git clone https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/deps/start/plenary.nvim | |
| # Link the plugin itself to the runtime path | |
| ln -s $(pwd) ~/.local/share/nvim/site/pack/deps/start/buildkite.nvim | |
| - name: Run basic syntax check | |
| run: | | |
| nvim --headless -c "lua loadfile('lua/buildkite/init.lua')()" -c "qa!" | |
| - name: Test module loading | |
| run: | | |
| nvim --headless -c "lua require('buildkite.config')" -c "qa!" | |
| nvim --headless -c "lua require('buildkite.api')" -c "qa!" | |
| nvim --headless -c "lua require('buildkite.commands')" -c "qa!" | |
| nvim --headless -c "lua require('buildkite.git')" -c "qa!" | |
| nvim --headless -c "lua require('buildkite.health')" -c "qa!" | |
| - name: Test health check | |
| run: | | |
| nvim --headless -c "checkhealth buildkite" -c "qa!" | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install luacheck | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y luarocks | |
| sudo luarocks install luacheck | |
| - name: Run luacheck | |
| run: | | |
| luacheck lua/ --globals vim |