Skip to content

Commit

Permalink
Add PHP 8.4 to the build matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbalandan committed Aug 24, 2024
1 parent b16f33c commit 22a965d
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@ jobs:
fail-fast: false
matrix:
php-version:
- 8.3
- '8.3'
os:
- ubuntu-22.04
- windows-2019
# TODO: remove once PHP 8.4 is released
include:
- php-version: '8.4'
os: ubuntu-22.04

name: Unit Tests
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -60,28 +64,32 @@ jobs:
${{ github.workflow }}-PHP_${{ matrix.php-version }}-
- name: Install dependencies
run: composer update --ansi --no-scripts
run: composer update --ansi --no-scripts ${{ env.EXPERIMENTAL }}
env:
EXPERIMENTAL: ${{ matrix.php-version == '8.4' && '--ignore-platform-req=php' || '' }}

- name: Run Unit Tests
shell: bash
continue-on-error: ${{ matrix.php-version == 8.4 }}
run: |
bin/parallel-phpunit ${{ env.COVERAGE_OPTION }}
env:
COVERAGE_OPTION: ${{ matrix.os != 'windows-2019' && '--coverage' || '' }}
COVERAGE_OPTION: ${{ (matrix.os != 'windows-2019' && matrix.os != '8.4') && '--coverage' || '' }}
TACHYCARDIA_MONITOR_GA: enabled

- name: Display structure of coverage files
if: matrix.os != 'windows-2019'
if: matrix.os != 'windows-2019' && matrix.php-version != '8.4'
run: ls -la
working-directory: build/cov

- name: Merge coverage files into Clover
if: matrix.os != 'windows-2019'
if: matrix.os != 'windows-2019' && matrix.php-version != '8.4'
run: |
composer global require phpunit/phpcov --ansi
phpcov merge --clover build/phpunit/clover.xml build/cov
- name: Upload coverage to Coveralls
if: matrix.os != 'windows-2019'
if: matrix.os != 'windows-2019' && matrix.php-version != '8.4'
run: |
composer global require php-coveralls/php-coveralls --ansi
php-coveralls --verbose --exclude-no-stmt --ansi --coverage_clover build/phpunit/clover.xml --json_path build/phpunit/coveralls-upload.json
Expand All @@ -91,9 +99,9 @@ jobs:
COVERALLS_FLAG_NAME: ${{ format('PHP_{0}-{1}', matrix.php-version, matrix.os) }}

coveralls-finish:
needs: tests
name: Notify Coveralls API
runs-on: ubuntu-22.04
needs: tests

steps:
- name: Complete parallel builds
Expand Down

0 comments on commit 22a965d

Please sign in to comment.