Bump phpunit/phpunit to ^10.5.62 || ^11.5.50 || ^12.5.8 in `compo…
#1647
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| pull_request: | |
| schedule: | |
| - cron: '0 0 * * 0' # weekly | |
| permissions: | |
| contents: read | |
| jobs: | |
| testsuite-linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php-version: ['8.4', '8.5'] | |
| dependencies: ['highest', 'lowest'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Validate composer.json and composer.lock | |
| run: composer validate --strict | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| extensions: mbstring, intl | |
| ini-values: zend.assertions=1 | |
| coverage: pcov | |
| - name: Composer install | |
| uses: ramsey/composer-install@v3 | |
| with: | |
| dependency-versions: ${{ matrix.dependencies }} | |
| - name: Run test suite | |
| run: | | |
| if [[ ${{ matrix.dependencies }} == 'highest' ]]; then | |
| export XDEBUG_MODE=coverage; | |
| vendor/bin/phpunit --display-skipped --display-deprecations --display-warnings --coverage-clover=coverage.xml | |
| else | |
| vendor/bin/phpunit --display-deprecations --display-warnings | |
| fi | |
| - name: Code Coverage Report | |
| # Coverage is generated only for PHP 8.4 with highest dependencies | |
| if: success() && matrix.php-version == '8.4' && matrix.dependencies == 'highest' | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| testsuite-windows: | |
| runs-on: windows-2022 | |
| name: Windows - PHP 8.4 | |
| env: | |
| EXTENSIONS: mbstring, intl | |
| PHP_VERSION: '8.4' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ env.PHP_VERSION }} | |
| extensions: ${{ env.EXTENSIONS }} | |
| ini-values: apc.enable_cli = 1 | |
| - name: Composer install | |
| uses: ramsey/composer-install@v3 | |
| - name: Run test suite | |
| run: composer run-script test | |
| real-drivers: | |
| name: Real drivers tests (Docker, PHP 8.4) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Build Docker environment | |
| run: docker compose -f docker/docker-compose.yml build | |
| - name: Start services | |
| run: docker compose -f docker/docker-compose.yml up -d | |
| - name: Install Composer dependencies (highest) | |
| run: docker compose -f docker/docker-compose.yml exec php composer install --no-interaction --prefer-dist --no-progress --no-scripts | |
| - name: Run real-drivers test suite | |
| run: docker compose -f docker/docker-compose.yml exec php vendor/bin/phpunit --testsuite=real-drivers | |
| - name: Shutdown services | |
| if: always() | |
| run: docker compose -f docker/docker-compose.yml down -v | |
| cs-stan: | |
| name: Coding Standard & Static Analysis | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| coverage: none | |
| tools: cs2pr | |
| - name: Composer install | |
| uses: ramsey/composer-install@v3 | |
| - name: Run PHP CodeSniffer | |
| continue-on-error: true | |
| run: vendor/bin/phpcs --report-full --report-checkstyle=./phpcs-report.xml | |
| - name: Show PHPCS results in PR | |
| run: cs2pr ./phpcs-report.xml | |
| - name: Run phpstan | |
| run: vendor/bin/phpstan analyse --error-format=github |