Symfony 7.4 / Twig / Doctrine DBAL auf herkömmlichem PHP-Webhosting. Versionierte Blockdokumente (v1-v3) mit unveränderlichen Revisionen, getrennten Entwürfen/Veröffentlichungen und optimistischer Konflikterkennung. Visueller Editor mit Strukturbaum, Live-Vorschau, responsiven Gerätewerten, Abschnittsvorlagen, Bildmediathek, Galerien und Effekten. Öffentliche Ausgabe ohne Editor-JavaScript. Geprüft: 41 PHP-Tests / 155 Assertions, 10 JavaScript-Modelltests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
86 lines
3.0 KiB
YAML
86 lines
3.0 KiB
YAML
name: CMS quality
|
|
on: [push, pull_request]
|
|
permissions:
|
|
contents: read
|
|
jobs:
|
|
php:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
php: ['8.2', '8.4']
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: '${{ matrix.php }}'
|
|
extensions: pdo_sqlite, pdo_mysql, mbstring, xml, gd, exif
|
|
coverage: none
|
|
- run: composer install --no-interaction --prefer-dist
|
|
- run: php bin/setup.php
|
|
- run: composer validate --strict
|
|
- run: composer lint
|
|
- run: composer test
|
|
- run: composer audit
|
|
- run: php vendor/bin/doctrine-migrations migrate --no-interaction
|
|
- run: php bin/console cms:seed-demo
|
|
- run: php bin/console cms:seed-demo
|
|
- run: php bin/console lint:twig templates && php bin/console lint:yaml config && php bin/console lint:container
|
|
- run: composer build
|
|
browser:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: '8.4'
|
|
extensions: pdo_sqlite, gd, exif
|
|
coverage: none
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '24'
|
|
cache: npm
|
|
- run: composer install --no-interaction --prefer-dist
|
|
- run: php bin/setup.php
|
|
- run: php vendor/bin/doctrine-migrations migrate --no-interaction && php bin/console cms:seed-demo
|
|
- run: composer build
|
|
- run: npm ci && npx playwright install --with-deps chromium
|
|
- run: npm test
|
|
- run: npm run test:editor -- --audit
|
|
- name: Start production-mode preview
|
|
run: APP_ENV=prod APP_DEBUG=0 php -S 127.0.0.1:8080 -t public > var/server.log 2>&1 &
|
|
- name: Wait for preview
|
|
run: node -e "for(let i=0;i<30;i++){try{if((await fetch('http://127.0.0.1:8080')).ok)process.exit(0)}catch{}await new Promise(r=>setTimeout(r,500))}process.exit(1)"
|
|
- run: npm run test:browser
|
|
- run: npm run audit
|
|
- uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: browser-and-lighthouse
|
|
path: reports/
|
|
mysql:
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
mysql:
|
|
image: mysql:8.0
|
|
env:
|
|
MYSQL_DATABASE: kant_ci
|
|
MYSQL_USER: kant_ci
|
|
MYSQL_PASSWORD: ci_only
|
|
MYSQL_ROOT_PASSWORD: ci_only_root
|
|
ports: ['3306:3306']
|
|
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=10
|
|
env:
|
|
DATABASE_URL: mysql://kant_ci:ci_only@127.0.0.1:3306/kant_ci?charset=utf8mb4
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: '8.4'
|
|
extensions: pdo_mysql, gd, exif
|
|
coverage: none
|
|
- run: composer install --no-interaction --prefer-dist
|
|
- run: php bin/setup.php
|
|
- run: php vendor/bin/doctrine-migrations migrate --no-interaction
|
|
- run: php bin/console cms:seed-demo
|
|
- run: php bin/console cms:seed-demo
|