Skip to content

Merge pull request #7818 from kenjis/fix-set_checkbox #69

Merge pull request #7818 from kenjis/fix-set_checkbox

Merge pull request #7818 from kenjis/fix-set_checkbox #69

Workflow file for this run

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:
- '7.4'
- '8.0'
- '8.1'
- '8.2'
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
database-live-tests:
needs:
- coverage-php-version
- sanity-tests
strategy:
fail-fast: false
matrix:
php-version:
- '7.4'
- '8.0'
- '8.1'
- '8.2'
db-platform:
- MySQLi
- OCI8
- Postgre
- SQLSRV
- SQLite3
mysql-version:
- '5.7'
include:
- php-version: '7.4'
db-platform: MySQLi
mysql-version: '8.0'
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
separate-process-tests:
needs:
- coverage-php-version
- sanity-tests
strategy:
matrix:
php-version:
- '7.4'
- '8.0'
- '8.1'
- '8.2'
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
cache-live-tests:
needs:
- coverage-php-version
- sanity-tests
strategy:
matrix:
php-version:
- '7.4'
- '8.0'
- '8.1'
- '8.2'
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
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 }}