From f8f3ba133584f60a276ed5a67c0633afbbc7399c Mon Sep 17 00:00:00 2001 From: Gary Date: Sat, 10 Jan 2026 22:51:46 +1100 Subject: [PATCH] Add syntax check workflow for bash, PHP, and YAML files --- .gitea/workflows/syntax-check.yml | 44 +++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .gitea/workflows/syntax-check.yml diff --git a/.gitea/workflows/syntax-check.yml b/.gitea/workflows/syntax-check.yml new file mode 100644 index 0000000..b023c52 --- /dev/null +++ b/.gitea/workflows/syntax-check.yml @@ -0,0 +1,44 @@ +name: Syntax Check + +on: + push: + branches: + - main + - master + - dev + pull_request: + branches: + - main + - master + - dev + +jobs: + syntax-check: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install ShellCheck + run: apt-get update && apt-get install -y shellcheck + + - name: Check bash script syntax + run: | + echo "Checking bash scripts..." + shellcheck git.sh + shellcheck example-trigger/deploy.sh + + - name: Install PHP + run: apt-get install -y php-cli + + - name: Check PHP syntax + run: | + echo "Checking PHP scripts..." + php -l example-trigger/deploy.php + + - name: Validate YAML configuration + run: | + echo "Checking YAML files..." + python3 -c "import yaml; yaml.safe_load(open('bitbucket-pipelines.yml'))" + python3 -c "import yaml; yaml.safe_load(open('.gitea/workflows/syntax-check.yml'))"