Eine Quelle entscheidet jetzt, welche Seite unter / antwortet: SiteSettings::homePath() und publicPath(). Das Literal home kommt im Anwendungscode nicht mehr vor - öffentliche Routen, Canonical, Sitemap, llms.txt, Menüauflösung, Beitragslisten und der Formularrücksprung benutzen dieselben zwei Methoden. Die gewählte Seite muss veröffentlicht und nicht im Papierkorb sein, ihre eigene Adresse leitet dauerhaft auf /, und als Wurzel ist sie gegen Umbenennen und Papierkorb gesperrt. Zweiter echter Fehler, den nur ein HTTP-Aufruf zeigt: /sitemap.xml, /robots.txt, /llms.txt und /feed.xml waren lokal nie erreichbar. Der eingebaute PHP-Server antwortet für fehlende Pfade mit Dateiendung selbst mit 404, ohne den Frontcontroller zu fragen; alle Kernel-Tests bestanden trotzdem, weil sie die Anwendung direkt aufrufen. bin/dev-router.php bildet die Rewrite-Regel des Hostings nach, Start- und CI-Befehl nutzen es, und die Browserprüfung ruft die vier Adressen jetzt über HTTP auf. Barrierefreiheitsbefunde werden nach Ursache getrennt: ein Kontrastfehler aus Theme oder Stylesheet bleibt ein Defekt und bricht den Lauf ab, einer aus einer im Editor gesetzten Blockfarbe wird bei jedem Lauf mit Seite, Farbe und Verhältnis genannt und in reports/browser.json geschrieben, färbt aber keinen Codewechsel rot. Geprüft: 162 PHP-Tests / 636 Assertions unter PHP 8.2.12 und 8.4.22, 15 JavaScript-Modelltests, vollständiger Editortest mit axe, wieder grüne öffentliche Browserprüfung und Lighthouse mit je drei Läufen mobil und Desktop, alle fünf Kategorien 100. 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 bin/dev-router.php > 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
|