name: Anti-EAV Lint + Quality Gate on: push: branches: [main, master, develop] pull_request: branches: [main, master] concurrency: group: ${{ gitea.workflow }}-${{ gitea.ref }} cancel-in-progress: true jobs: anti-eav-lint: runs-on: ubuntu-latest timeout-minutes: 10 steps: - name: Checkout uses: actions/checkout@v4 - name: Composer install (no-dev) run: | if [ -f composer.json ]; then composer install --no-dev --optimize-autoloader --no-interaction fi - name: PHP syntax lint run: | set -e FAILED=$(find . -name '*.php' \ -not -path './vendor/*' \ -not -path './node_modules/*' \ -not -path './e2e/*' \ -not -path './tests/*' \ -exec php -l {} \; 2>&1 | grep -v 'No syntax errors' || true) if [ -n "$FAILED" ]; then echo "PHP syntax errors detected:" echo "$FAILED" exit 1 fi - name: Anti-EAV strict lint run: | if ! command -v wp >/dev/null 2>&1; then echo "wp-cli not available; skipping anti-eav lint" exit 0 fi # dev30 hosts the plugin family this repo belongs to. TMDO_HOST="/var/www/Studio/wp-local-dev30" if [ -d "$TMDO_HOST" ]; then wp --path="$TMDO_HOST" tmdo lint --plugin="${GITHUB_WORKSPACE}" --strict else echo "TMDO_HOST not found; skipping anti-eav lint" fi - name: Packaging audit (10-check) run: | # package-plugin.sh lives in the wp-local-dev tree and is shared by all # custom plugins; its output goes to wp-local-dev/dist/. PACKAGING_HOST="/var/www/Studio/wp-local-dev" if [ -d "$PACKAGING_HOST" ]; then SLUG="2meet-data-optimizer" bash "$PACKAGING_HOST/scripts/package-plugin.sh" "$SLUG" else echo "PACKAGING_HOST not found; skipping packaging audit" fi