Drop PHP 7.4 support #9224
Workflow file for this run
This file contains 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: PHPUnit | |
on: | |
push: | |
branches: | |
- develop | |
- '4.*' | |
paths: | |
- 'app/**.php' | |
- 'system/**.php' | |
- 'tests/**.php' | |
- 'spark' | |
- composer.json | |
- phpunit.xml.dist | |
- .github/workflows/test-phpunit.yml | |
- .github/workflows/reusable-phpunit-test.yml | |
pull_request: | |
branches: | |
- develop | |
- '4.*' | |
paths: | |
- 'app/**.php' | |
- 'system/**.php' | |
- 'tests/**.php' | |
- 'spark' | |
- composer.json | |
- phpunit.xml.dist | |
- .github/workflows/test-phpunit.yml | |
- .github/workflows/reusable-phpunit-test.yml | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
# Any environment variables set in an env context defined at the workflow level | |
# in the caller workflow are not propagated to the called workflow. | |
coverage-php-version: | |
name: Setup PHP Version for Code Coverage | |
runs-on: ubuntu-22.04 | |
outputs: | |
version: ${{ steps.coverage-php-version.outputs.version }} | |
steps: | |
- id: coverage-php-version | |
run: | | |
echo "version=8.1" >> $GITHUB_OUTPUT | |
sanity-tests: | |
needs: coverage-php-version | |
strategy: | |
matrix: | |
php-version: | |
- '8.0' | |
- '8.1' | |
- '8.2' | |
- '8.3' | |
include: | |
- php-version: '8.3' | |
composer-option: '--ignore-platform-req=php' | |
uses: ./.github/workflows/reusable-phpunit-test.yml # @TODO Extract to codeigniter4/.github repo | |
with: | |
job-name: Sanity Tests | |
php-version: ${{ matrix.php-version }} | |
job-id: sanity-tests | |
group-name: Others | |
enable-artifact-upload: ${{ matrix.php-version == needs.coverage-php-version.outputs.version }} | |
enable-coverage: ${{ matrix.php-version == needs.coverage-php-version.outputs.version }} | |
enable-profiling: ${{ matrix.php-version == needs.coverage-php-version.outputs.version }} | |
extra-extensions: imagick, redis, memcached | |
extra-composer-options: ${{ matrix.composer-option }} | |
database-live-tests: | |
needs: | |
- coverage-php-version | |
- sanity-tests | |
strategy: | |
fail-fast: false | |
matrix: | |
php-version: | |
- '8.0' | |
- '8.1' | |
- '8.2' | |
- '8.3' | |
db-platform: | |
- MySQLi | |
- OCI8 | |
- Postgre | |
- SQLSRV | |
- SQLite3 | |
mysql-version: | |
- '5.7' | |
include: | |
- php-version: '8.0' | |
db-platform: MySQLi | |
mysql-version: '8.0' | |
- php-version: '8.3' | |
composer-option: '--ignore-platform-req=php' | |
uses: ./.github/workflows/reusable-phpunit-test.yml # @TODO Extract to codeigniter4/.github repo | |
with: | |
job-name: Database Live Tests | |
php-version: ${{ matrix.php-version }} | |
job-id: database-live-tests | |
db-platform: ${{ matrix.db-platform }} | |
mysql-version: ${{ matrix.mysql-version }} | |
group-name: DatabaseLive | |
enable-artifact-upload: ${{ matrix.php-version == needs.coverage-php-version.outputs.version }} | |
enable-coverage: ${{ matrix.php-version == needs.coverage-php-version.outputs.version }} | |
enable-profiling: ${{ matrix.php-version == needs.coverage-php-version.outputs.version }} | |
extra-extensions: mysqli, oci8, pgsql, sqlsrv-5.10.1, sqlite3 | |
extra-composer-options: ${{ matrix.composer-option }} | |
separate-process-tests: | |
needs: | |
- coverage-php-version | |
- sanity-tests | |
strategy: | |
matrix: | |
php-version: | |
- '8.0' | |
- '8.1' | |
- '8.2' | |
- '8.3' | |
include: | |
- php-version: '8.3' | |
composer-option: '--ignore-platform-req=php' | |
uses: ./.github/workflows/reusable-phpunit-test.yml # @TODO Extract to codeigniter4/.github repo | |
with: | |
job-name: Separate Process Tests | |
php-version: ${{ matrix.php-version }} | |
job-id: separate-process-tests | |
group-name: SeparateProcess | |
enable-artifact-upload: ${{ matrix.php-version == needs.coverage-php-version.outputs.version }} | |
enable-coverage: true # needs xdebug for assertHeaderEmitted() tests | |
enable-profiling: ${{ matrix.php-version == needs.coverage-php-version.outputs.version }} | |
extra-extensions: mysqli, oci8, pgsql, sqlsrv-5.10.1, sqlite3 | |
extra-composer-options: ${{ matrix.composer-option }} | |
cache-live-tests: | |
needs: | |
- coverage-php-version | |
- sanity-tests | |
strategy: | |
matrix: | |
php-version: | |
- '8.0' | |
- '8.1' | |
- '8.2' | |
- '8.3' | |
include: | |
- php-version: '8.3' | |
composer-option: '--ignore-platform-req=php' | |
uses: ./.github/workflows/reusable-phpunit-test.yml # @TODO Extract to codeigniter4/.github repo | |
with: | |
job-name: Cache Live Tests | |
php-version: ${{ matrix.php-version }} | |
job-id: cache-live-tests | |
group-name: CacheLive | |
enable-artifact-upload: ${{ matrix.php-version == needs.coverage-php-version.outputs.version }} | |
enable-coverage: ${{ matrix.php-version == needs.coverage-php-version.outputs.version }} | |
enable-profiling: ${{ matrix.php-version == needs.coverage-php-version.outputs.version }} | |
extra-extensions: redis, memcached | |
extra-composer-options: ${{ matrix.composer-option }} | |
coveralls: | |
name: Upload coverage results to Coveralls | |
if: github.repository_owner == 'codeigniter4' | |
needs: | |
- coverage-php-version | |
- sanity-tests | |
- cache-live-tests | |
- database-live-tests | |
- separate-process-tests | |
uses: ./.github/workflows/reusable-coveralls.yml # @TODO Extract to codeigniter4/.github repo | |
with: | |
php-version: ${{ needs.coverage-php-version.outputs.version }} |