7425b263d5
- Add 4 CakePHP Claude Code skills: cakephp-unit-test, cakephp-test-setup, cakephp-test-review, cakephp-mock-helper - Add 11 CakePHP PHPUnit component templates (Table, Entity, Controller, Service, Command, Component, Middleware, Mailer, Form, Behavior, Helper) - Add CakePHP configs (phpunit.xml.dist, app_local.test.php for SQLite in-memory) - Add comprehensive CakePHP documentation and component guides - Update test-runner.sh and installer to auto-detect Laravel and CakePHP - Add CakePHP CI/CD templates for GitHub Actions and GitLab CI - Update system prompt, verification checklist, and README with dedicated guides
50 lines
1.4 KiB
Plaintext
50 lines
1.4 KiB
Plaintext
name: CakePHP Unit Tests & Quality Gate
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, master, develop ]
|
|
pull_request:
|
|
branches: [ main, master, develop ]
|
|
|
|
jobs:
|
|
unit-tests:
|
|
name: Unit Tests (PHP ${{ matrix.php }} - CakePHP)
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
php: ['8.1', '8.2', '8.3']
|
|
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup PHP & Extensions
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: ${{ matrix.php }}
|
|
extensions: mbstring, intl, dom, fileinfo, sqlite3, pdo_sqlite, pcov
|
|
coverage: pcov
|
|
tools: composer:v2
|
|
|
|
- name: Cache Composer Dependencies
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: vendor
|
|
key: ${{ runner.os }}-php-${{ matrix.php }}-cakephp-${{ hashFiles('**/composer.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-php-${{ matrix.php }}-cakephp-
|
|
|
|
- name: Install Dependencies
|
|
run: composer update --prefer-stable --prefer-dist --no-interaction --no-progress
|
|
|
|
- name: Run CakePHP Tests with Coverage
|
|
run: |
|
|
if [ -f "bin/cake" ]; then
|
|
bin/cake test app --coverage-clover coverage.xml
|
|
else
|
|
./vendor/bin/phpunit --coverage-clover coverage.xml
|
|
fi
|
|
env:
|
|
TMP: /tmp/
|