Unifi-Voucher-Tool/.github/workflows/ci.yml
Claude 997cda01a8
E-Mail-Retry, Voucher-Resend, Tageslimit, Docker-Politur
- Mailer::send mit Retry (2 Versuche); SMTP-Test & Templates waren bereits da
- admin/vouchers.php: Code per E-Mail (erneut) versenden (ajax_resend)
- Tageslimit Voucher pro Nicht-Admin-Benutzer (Setting + Durchsetzung in index)
- Docker: HEALTHCHECK (health.php) + curl; GHCR-Publish-Workflow
- Setting user_daily_voucher_limit + enforce in integrations.php
2026-06-05 20:56:26 +00:00

57 lines
1.4 KiB
YAML

name: CI
on:
push:
branches: [ "**" ]
pull_request:
jobs:
lint:
name: PHP Lint
runs-on: ubuntu-latest
strategy:
matrix:
php: [ "7.4", "8.2" ]
steps:
- uses: actions/checkout@v4
- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: pdo, pdo_mysql, curl, mbstring, json
coverage: none
- name: Syntax check all PHP files
run: |
set -e
find . -name '*.git' -prune -o -name '*.php' -print | while read -r f; do
php -l "$f"
done
- name: Validate JSON language/migration assets
run: |
php -r 'foreach (glob("lang/*.php") as $f) { $a = require $f; if (!is_array($a)) { fwrite(STDERR, "Bad lang file: $f\n"); exit(1);} } echo "lang OK\n";'
test:
name: Unit Tests & Static Analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PHP 8.2
uses: shivammathur/setup-php@v2
with:
php-version: "8.2"
extensions: pdo, pdo_mysql, curl, mbstring, json
tools: composer
coverage: none
- name: Install dependencies
run: composer install --no-interaction --no-progress
- name: PHPUnit
run: vendor/bin/phpunit
- name: PHPStan
run: vendor/bin/phpstan analyse --no-progress