name: Tests - Run PHP compatibility and unit tests on: push: branches: [ main ] pull_request: branches: [ main ] jobs: test: name: PHP ${{ matrix.php-versions }} runs-on: ubuntu-latest strategy: matrix: php-versions: ['7.4', '8.0'] fail-fast: false steps: - name: Checkout code uses: actions/checkout@v4 with: clean: 'true' - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} extensions: mbstring, intl, zip tools: composer:v2 - name: Clear Composer Cache run: composer clear-cache - name: Install dependencies run: composer install --prefer-dist --no-progress - name: Run tests run: ./vendor/bin/phpunit code-style: name: Code Style runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 with: clean: 'true' - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: '7.4' extensions: mbstring, intl, zip tools: composer:v2, phpcs - name: Clear Composer Cache run: composer clear-cache - name: Install dependencies run: composer install --prefer-dist --no-progress - name: Run PHPCS run: composer run phpcs continue-on-error: true - name: Run PHPCBF (report only) run: | echo "Running PHPCBF in dry-run mode to show what would be fixed" composer run phpcbf -- --dry-run continue-on-error: true