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