From bd8fbb619672a19dd8fd731c747069cf34a03ef3 Mon Sep 17 00:00:00 2001 From: Kael AI Agent Date: Thu, 12 Mar 2026 00:33:16 +0100 Subject: [PATCH] 37488db3-c6cb-49a7-9da3-bbf0b04366e8 Set up GitHub Actions CI to lint shell scripts and validate syntax Implemented by Kael AI Agent --- .github/workflows/ci.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a31955b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: CI + +on: + push: + branches: [ "**" ] + pull_request: + branches: [ "**" ] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install ShellCheck + run: | + sudo apt-get update + sudo apt-get install -y shellcheck + + - name: Run ShellCheck on all shell scripts + run: | + # Find all *.sh files tracked by git + SH_FILES=$(git ls-files '*.sh') + if [ -z "$SH_FILES" ]; then + echo "No shell script files found." + exit 0 + fi + echo "Running shellcheck on the following files:" + echo "$SH_FILES" + shellcheck $SH_FILES + + - name: Validate Vim configuration syntax + run: | + # Run Vim in headless mode to load syntax highlighting and exit. + # Any syntax errors in Vim configuration files will cause a non‑zero exit. + vim --cmd 'set nomore' -c 'syntax on' -c 'quit' || exit 1 \ No newline at end of file