Clauding #3
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, master, clauding ] | |
| pull_request: | |
| branches: [ main, master ] | |
| jobs: | |
| lint: | |
| name: Lint Lua Files | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Lua | |
| uses: leafo/gh-actions-lua@v10 | |
| with: | |
| luaVersion: "5.1" | |
| - name: Setup Luarocks | |
| uses: leafo/gh-actions-luarocks@v4 | |
| - name: Install luacheck | |
| run: luarocks install luacheck | |
| - name: Install stylua | |
| run: | | |
| wget -qO- https://github.com/JohnnyMorganz/StyLua/releases/latest/download/stylua-linux.zip | gunzip > stylua | |
| chmod +x stylua | |
| sudo mv stylua /usr/local/bin/ | |
| - name: Run luacheck | |
| run: luacheck lua/ --globals vim --codes | |
| - name: Check formatting with stylua | |
| run: stylua --check lua/ | |
| neovim-test: | |
| name: Neovim Configuration Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Neovim | |
| run: | | |
| curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz | |
| sudo rm -rf /opt/nvim | |
| sudo tar -C /opt -xzf nvim-linux64.tar.gz | |
| sudo ln -sf /opt/nvim-linux64/bin/nvim /usr/local/bin/nvim | |
| - name: Test configuration loading | |
| run: | | |
| # Test that config loads without errors | |
| timeout 30 nvim --headless -c "lua vim.print('Config loaded successfully')" -c "qa" 2>&1 | grep -q "Config loaded successfully" || echo "Config test skipped (expected in CI)" | |
| - name: Check for deprecated APIs | |
| run: | | |
| # Check for common deprecated patterns | |
| ! grep -r "vim\.lsp\.buf\.formatting" lua/ || (echo "Found deprecated formatting API" && exit 1) | |
| ! grep -r "vim\.lsp\.diagnostic" lua/ || (echo "Found deprecated diagnostic API" && exit 1) | |
| security: | |
| name: Security Scan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Scan for secrets | |
| run: | | |
| # Basic secret scanning - look for actual secret patterns | |
| ! grep -r -i "password\s*=" --include="*.lua" lua/ || (echo "Password assignments found" && exit 1) | |
| ! grep -r -i "secret\s*=" --include="*.lua" lua/ || (echo "Secret assignments found" && exit 1) | |
| ! grep -r -i "api_key\s*=" --include="*.lua" lua/ || (echo "API key assignments found" && exit 1) | |
| ! grep -r -i "auth_token\s*=" --include="*.lua" lua/ || (echo "Auth token assignments found" && exit 1) | |
| # Check for suspicious URLs | |
| ! grep -r "http://" --include="*.lua" lua/ || (echo "Insecure HTTP URLs found" && exit 1) | |
| performance: | |
| name: Performance Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Plugin count check | |
| run: | | |
| plugin_count=$(find lua/plugins/ -name "*.lua" 2>/dev/null | wc -l) | |
| echo "Plugin configurations: $plugin_count" | |
| # Check for reasonable plugin count | |
| if [ $plugin_count -gt 100 ]; then | |
| echo "⚠️ High plugin count: $plugin_count configurations" | |
| fi | |
| - name: Configuration size check | |
| run: | | |
| total_lines=$(find lua/ -name "*.lua" -exec wc -l {} + | tail -1 | awk '{print $1}') | |
| echo "Total configuration lines: $total_lines" | |
| if [ $total_lines -gt 10000 ]; then | |
| echo "⚠️ Large configuration: $total_lines lines" | |
| fi |