Add syntax check workflow for bash, PHP, and YAML files
Some checks failed
Syntax Check / syntax-check (push) Failing after 54s

This commit is contained in:
Gary
2026-01-10 22:51:46 +11:00
parent 0623303364
commit f8f3ba1335

View File

@@ -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'))"