fix(ci): correct kcode.phar download URL in release notes #59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Code Quality | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| - 'feature/**' | |
| pull_request: | |
| branches: | |
| - main | |
| - develop | |
| workflow_dispatch: | |
| jobs: | |
| # ============================================================================ | |
| # DEPENDENCY VALIDATION | |
| # ============================================================================ | |
| dependencies: | |
| name: Dependency Validation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| tools: composer:v2 | |
| coverage: none | |
| - name: Validate composer.json | |
| run: composer validate --strict --no-check-lock | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress --no-scripts | |
| - name: Check platform requirements | |
| run: composer check-platform-reqs | |
| # ============================================================================ | |
| # SECURITY AUDIT | |
| # ============================================================================ | |
| security: | |
| name: Security Audit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| tools: composer:v2 | |
| coverage: none | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress --no-scripts | |
| - name: Run composer audit | |
| run: composer audit --format=plain | |
| # ============================================================================ | |
| # STATIC ANALYSIS (PHPStan) | |
| # ============================================================================ | |
| phpstan: | |
| name: PHPStan Static Analysis | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| coverage: none | |
| tools: composer:v2 | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress --no-scripts | |
| - name: Initialize devkit config | |
| run: php bin/kcode init | |
| - name: Run PHPStan via kcode | |
| run: php bin/kcode analyse | |
| # ============================================================================ | |
| # CODE STYLE (PHP CS Fixer via kcode) | |
| # ============================================================================ | |
| cs-fixer: | |
| name: Code Style Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| coverage: none | |
| tools: composer:v2 | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress --no-scripts | |
| - name: Initialize devkit config | |
| run: php bin/kcode init | |
| - name: Check code style via kcode | |
| run: php bin/kcode cs:fix --check | |
| # ============================================================================ | |
| # QUALITY SUMMARY | |
| # ============================================================================ | |
| quality-summary: | |
| name: Quality Summary | |
| runs-on: ubuntu-latest | |
| needs: [dependencies, security, phpstan, cs-fixer] | |
| if: always() | |
| steps: | |
| - name: Check overall quality status | |
| run: | | |
| echo "## Quality Checks Summary" >> "$GITHUB_STEP_SUMMARY" | |
| echo "" >> "$GITHUB_STEP_SUMMARY" | |
| echo "| Check | Status |" >> "$GITHUB_STEP_SUMMARY" | |
| echo "|-------|--------|" >> "$GITHUB_STEP_SUMMARY" | |
| echo "| Dependencies | ${{ needs.dependencies.result }} |" >> "$GITHUB_STEP_SUMMARY" | |
| echo "| Security | ${{ needs.security.result }} |" >> "$GITHUB_STEP_SUMMARY" | |
| echo "| PHPStan | ${{ needs.phpstan.result }} |" >> "$GITHUB_STEP_SUMMARY" | |
| echo "| CS Fixer | ${{ needs.cs-fixer.result }} |" >> "$GITHUB_STEP_SUMMARY" | |
| if [ "${{ needs.security.result }}" != "success" ] || \ | |
| [ "${{ needs.phpstan.result }}" != "success" ] || \ | |
| [ "${{ needs.cs-fixer.result }}" != "success" ]; then | |
| echo "" >> "$GITHUB_STEP_SUMMARY" | |
| echo "❌ Quality checks failed." >> "$GITHUB_STEP_SUMMARY" | |
| exit 1 | |
| fi | |
| echo "" >> "$GITHUB_STEP_SUMMARY" | |
| echo "✅ All quality checks passed!" >> "$GITHUB_STEP_SUMMARY" |