fix: delete retired workflows and fix duplicate env: [skip ci]
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,132 +0,0 @@
|
||||
name: Continuous Integration Pipeline
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- "version/*"
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
php-lint:
|
||||
name: PHP lint
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: "8.2"
|
||||
coverage: none
|
||||
|
||||
- name: Lint PHP files under src
|
||||
run: |
|
||||
if [ -d "src" ]; then
|
||||
echo "Running php -l against PHP files in src/"
|
||||
find src -type f -name "*.php" -print0 | xargs -0 -n 1 -P 4 php -l
|
||||
else
|
||||
echo "No src directory found. Skipping PHP lint."
|
||||
fi
|
||||
|
||||
composer-tests:
|
||||
name: Composer install and tests
|
||||
runs-on: ubuntu-latest
|
||||
needs: php-lint
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: "8.2"
|
||||
coverage: none
|
||||
|
||||
- name: Install dependencies if composer.json exists
|
||||
run: |
|
||||
if [ -f "composer.json" ]; then
|
||||
composer install --no-interaction --no-progress --prefer-dist
|
||||
else
|
||||
echo "No composer.json found. Skipping dependency install and tests."
|
||||
fi
|
||||
|
||||
- name: Run Composer tests when defined
|
||||
run: |
|
||||
if [ ! -f "composer.json" ]; then
|
||||
echo "No composer.json. Nothing to test."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if composer run -q | grep -q "^ test"; then
|
||||
echo "Detected composer script 'test'. Running composer test."
|
||||
composer test
|
||||
else
|
||||
echo "No 'test' script defined in composer.json. Skipping tests."
|
||||
fi
|
||||
|
||||
validate-manifest-and-changelog:
|
||||
name: Validate manifest and changelog via scripts
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- php-lint
|
||||
- composer-tests
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Run manifest validation script if present
|
||||
run: |
|
||||
set -e
|
||||
echo "Checking for manifest validation scripts"
|
||||
|
||||
if [ -x "scripts/validate_manifest.sh" ]; then
|
||||
echo "Running scripts/validate_manifest.sh"
|
||||
scripts/validate_manifest.sh
|
||||
elif [ -f "scripts/validate_manifest.php" ]; then
|
||||
echo "Running scripts/validate_manifest.php"
|
||||
php scripts/validate_manifest.php
|
||||
elif [ -f "scripts/validate_manifest.py" ]; then
|
||||
echo "Running scripts/validate_manifest.py"
|
||||
python scripts/validate_manifest.py
|
||||
else
|
||||
echo "No manifest validation script found (scripts/validate_manifest.*). Skipping manifest validation step."
|
||||
fi
|
||||
|
||||
- name: Run changelog update/verification script if present
|
||||
run: |
|
||||
set -e
|
||||
echo "Checking for changelog update or verification scripts"
|
||||
|
||||
if [ -x "scripts/update_changelog.sh" ]; then
|
||||
echo "Running scripts/update_changelog.sh --ci"
|
||||
scripts/update_changelog.sh --ci
|
||||
elif [ -f "scripts/update_changelog.py" ]; then
|
||||
echo "Running scripts/update_changelog.py --ci"
|
||||
python scripts/update_changelog.py --ci
|
||||
elif [ -x "scripts/verify_changelog.sh" ]; then
|
||||
echo "Running scripts/verify_changelog.sh"
|
||||
scripts/verify_changelog.sh
|
||||
else
|
||||
echo "No changelog script found (scripts/update_changelog.* or scripts/verify_changelog.sh). Skipping changelog enforcement."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Checking for uncommitted changes after changelog script"
|
||||
if ! git diff --quiet; then
|
||||
echo "Changelog or related files were modified by the script."
|
||||
echo "Please run the changelog script locally and commit the changes before pushing."
|
||||
git diff
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user