name: CI on: push: branches: [main] pull_request: branches: [main] jobs: shellcheck: name: ShellCheck runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - name: Install ShellCheck (best effort) run: | command -v shellcheck >/dev/null 2>&1 && { echo "shellcheck already available"; exit 0; } command -v apt-get >/dev/null 2>&1 || { echo "no apt-get on this runner — ShellCheck will be skipped"; exit 0; } SUDO="" command -v sudo >/dev/null 2>&1 && SUDO="sudo" $SUDO apt-get update -qq && $SUDO apt-get install -y -qq shellcheck \ || echo "shellcheck install failed — ShellCheck will be skipped" - name: Run ShellCheck run: | command -v shellcheck >/dev/null 2>&1 || { echo "shellcheck unavailable — skipping"; exit 0; } for f in runaway lib/*.sh examples/*.sh; do [ -f "$f" ] || continue echo "Checking: $f" shellcheck -S warning -s bash "$f" || exit 1 done syntax: name: Bash Syntax Check runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - name: Check syntax run: | for f in runaway lib/*.sh examples/*.sh; do [ -f "$f" ] || continue echo "Checking: $f" bash -n "$f" || exit 1 done echo "All files pass syntax check" markdown: name: Markdown Lint runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - name: Install markdownlint (best effort) run: | if command -v npm >/dev/null 2>&1; then npm install -g markdownlint-cli 2>/dev/null || echo "npm install failed — lint will be skipped" else echo "npm not available on this runner — lint will be skipped" fi - name: Lint markdown run: | command -v markdownlint >/dev/null 2>&1 || { echo "markdownlint unavailable — skipping"; exit 0; } markdownlint '*.md' --config /dev/null || true