Skip to content

Commit

Permalink
Tests: Add PHP 8.4 and move PCOV to PHP 8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
acicovic committed Oct 18, 2024
1 parent ccaa940 commit be67fa9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 28 deletions.
31 changes: 11 additions & 20 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,34 +23,25 @@ jobs:
WP_VERSION: ${{ matrix.wp }}

strategy:
# PHP 7.2 uses PHPUnit 8.5.21
# PHP 7.3 uses PHPUnit 9.5.10
# PHP 7.4 uses PHPUnit 9.5.10
# PHP 8.0 uses PHPUnit 9.5.10
# PHP 8.1 uses PHPUnit 9.5.10
# PHP 8.2 uses PHPUnit 9.5.10
# Note: Different PHP versions use different PHPUnit versions.
# Keys:
# - coverage: Whether to run the tests with code coverage.
# - experimental: Whether the build is "allowed to fail".
matrix:
php: [ '7.2', '7.3', '7.4', '8.0']
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.3']
wp: ['latest']
coverage: [none]
experimental: [false]
include:
- php: '8.1'
coverage: pcov
- php: '8.2'
coverage: pcov # Warning: PCOV might not work for PHP 8.4 or newer according to https://thephp.cc/articles/pcov-or-xdebug.
extensions: pcov
ini-values: pcov.directory=., "pcov.exclude=\"~(vendor|tests)~\""
experimental: false
- php: '8.2'
wp: 'trunk'
coverage: none
experimental: false
- php: '8.3'
- php: '8.4'
wp: 'trunk'
coverage: none
experimental: false
experimental: true
fail-fast: false
continue-on-error: ${{ matrix.experimental }}
steps:
Expand Down Expand Up @@ -92,17 +83,17 @@ jobs:
run: composer prepare-ci --no-interaction

- name: Run integration tests (single site)
if: ${{ matrix.php != 8.0 && ! matrix.experimental }}
if: ${{ matrix.php != 8.2 && ! matrix.experimental }}
run: composer testwp --no-interaction

- name: Run integration tests experimental
- name: Run integration tests (single site) experimental
if: ${{ matrix.experimental }}
run: composer testwp-experimental --no-interaction

- name: Run integration tests (multi site)
if: ${{ matrix.php != 8.0 && ! matrix.experimental }}
- name: Run integration tests (multisite)
if: ${{ matrix.php != 8.2 && ! matrix.experimental }}
run: composer testwp-ms --no-interaction

- name: Run integration tests (multisite site with code coverage)
if: ${{ matrix.php == 8.1 }}
if: ${{ matrix.php == 8.2 }} # To prevent unneeded test runs, use this version in the above if clauses.
run: composer coveragewp-ci --no-interaction
15 changes: 7 additions & 8 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,24 @@ jobs:
WP_VERSION: latest

strategy:
# PHP 7.2 uses PHPUnit 8.5.21
# PHP 7.3 uses PHPUnit 9.5.10
# PHP 7.4 uses PHPUnit 9.5.10
# PHP 8.0 uses PHPUnit 9.5.10
# PHP 8.1 uses PHPUnit 9.5.10
# Note: Different PHP versions use different PHPUnit versions.
# Keys:
# - coverage: Whether to run the tests with code coverage.
# - experimental: Whether the build is "allowed to fail".
matrix:
php: ['7.2', '7.3', '7.4', '8.0', '8.2', '8.3']
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.3']
coverage: [none]
experimental: [false]
include:
# Run code coverage for only one PHP version
- php: '8.1'
coverage: pcov
- php: '8.2'
coverage: pcov # Warning: PCOV might not work for PHP 8.4 or newer according to https://thephp.cc/articles/pcov-or-xdebug.
extensions: pcov
ini-values: pcov.directory=., "pcov.exclude=\"~(vendor|tests)~\""
experimental: false
- php: '8.4'
coverage: none
experimental: true
fail-fast: false
continue-on-error: ${{ matrix.experimental }}
steps:
Expand Down

0 comments on commit be67fa9

Please sign in to comment.