Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions .github/workflows/freebsd-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: FreeBSD Config Test

on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]

jobs:
test-freebsd:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Check Lua syntax
run: |
# Check if init.lua has valid Lua syntax
lua -l init.lua 2>&1 | head -20 || true

Comment on lines +16 to +20
- name: Validate shell scripts
run: |
# Validate shell scripts
sh -n install-freebsd.sh
sh -n check-freebsd.sh
sh -n uninstall-freebsd.sh

- name: Check file structure
run: |
# Verify essential files exist
test -f README.md && echo "✓ README.md exists"
test -f init.lua && echo "✓ init.lua exists"
test -f install-freebsd.sh && echo "✓ install-freebsd.sh exists"
test -f check-freebsd.sh && echo "✓ check-freebsd.sh exists"
test -f uninstall-freebsd.sh && echo "✓ uninstall-freebsd.sh exists"
test -f Makefile && echo "✓ Makefile exists"
test -f lazy-lock.json && echo "✓ lazy-lock.json exists"

- name: Check README format
run: |
# Verify README has essential sections
grep -q "kickstart.nvim-FreeBSD" README.md && echo "✓ README has correct title"
grep -q "FreeBSD" README.md && echo "✓ README mentions FreeBSD"
grep -q "install-freebsd.sh" README.md && echo "✓ README references install script"

- name: Validate Makefile
run: |
# Check if Makefile syntax is valid
make -n help > /dev/null && echo "✓ Makefile is valid"

config-validation:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Check for common config issues
run: |
# Check that treesitter config doesn't have hard-coded compiler paths
if grep -q "gcc" init.lua; then
echo "⚠ Warning: init.lua contains hardcoded 'gcc' reference"
fi

# Check that Mason auto-install is disabled
if grep -q "lua_ls.*ensure_installed" init.lua; then
echo "✓ lua_ls auto-install is properly handled"
fi

# Check treesitter build is disabled
if grep -q "build = false" init.lua; then
echo "✓ Treesitter build is disabled"
else
echo "⚠ Warning: Treesitter build might not be disabled"
fi

- name: Lint shell scripts
run: |
# Simple shell script linting
for script in install-freebsd.sh check-freebsd.sh uninstall-freebsd.sh; do
echo "Checking $script..."
head -1 "$script" | grep -q "^#!/" && echo "✓ $script has shebang"
done
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ test.sh
nvim

spell/
lazy-lock.json
36 changes: 36 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.PHONY: help install check sync clean uninstall

help:
@echo "kickstart.nvim-FreeBSD Makefile"
@echo ""
@echo "Available targets:"
@echo " make install - Install FreeBSD dependencies"
@echo " make check - Check if all dependencies are installed"
@echo " make sync - Start Neovim and sync plugins"
@echo " make clean - Clean Neovim cache and swap files"
@echo " make uninstall - Remove Neovim configuration"
@echo " make help - Show this help message"

install:
@echo "Installing FreeBSD dependencies..."
sudo sh install-freebsd.sh

check:
@echo "Checking dependencies..."
sh check-freebsd.sh

sync:
@echo "Starting Neovim and syncing plugins..."
nvim +Lazy sync +q

clean:
@echo "Cleaning Neovim cache..."
rm -rf ~/.local/share/nvim/swap
rm -rf ~/.local/state/nvim
@echo "Clean complete"

uninstall:
@echo "Uninstalling Neovim configuration..."
sh uninstall-freebsd.sh

.DEFAULT_GOAL := help
Loading
Loading