name: CI on: push: branches: [ master, main ] jobs: test: runs-on: ubuntu-latest strategy: matrix: node-version: [18.x, 20.x] steps: - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: 'npm' - name: Install dependencies run: npm ci - name: Security audit run: npm audit --audit-level=moderate || true - name: Validate JSON configs run: | echo "🔍 Validating JSON configuration files..." for file in $(find . -name "*.json" -not -path "./node_modules/*" -not -path "./.git/*"); do echo "Checking $file" if ! python3 -m json.tool "$file" > /dev/null 2>&1; then echo "❌ Invalid JSON: $file" exit 1 fi done echo "✅ All JSON files are valid" - name: Check tmux availability run: | if command -v tmux &> /dev/null; then echo "✅ tmux is available: $(tmux -V)" else echo "Installing tmux..." sudo apt-get update && sudo apt-get install -y tmux fi