Skip to content

Commit

Permalink
CI: Install PHPUnit 7.5 for WP < 5.9
Browse files Browse the repository at this point in the history
  • Loading branch information
GaryJones committed Jul 24, 2023
1 parent b38e1e5 commit b6161e4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/integrate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ jobs:
wordpress: [ '5.7', '6.2' ]
allowed_failure: [ false ]
include:
- php: '8.0'
# Ignore platform requirements, so that PHPUnit 7.5 can be installed on PHP 8.0 (and above).
composer-options: '--ignore-platform-reqs'
- php: '8.2'
extensions: pcov
ini-values: pcov.directory=., "pcov.exclude=\"~(vendor|tests)~\""
coverage: pcov
Expand All @@ -44,10 +42,15 @@ jobs:
ini-values: ${{ matrix.ini-values }}
coverage: ${{ matrix.coverage }}

- name: Install PHPUnit 7.x for WP < 5.9
if: ${{ matrix.wordpress < 5.9 }}
# Ignore platform requirements, so that PHPUnit 7.5 can be installed on PHP 8.0 (and above).
run: composer require --dev phpunit/phpunit:"^7.5" --ignore-platform-req=php+ --no-update --no-scripts --no-interaction

- name: Install Composer dependencies
uses: ramsey/composer-install@v2
with:
composer-options: "${{ matrix.composer-options }}"
composer-options: --ignore-platform-req=php+

- name: Set up problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
Expand Down

0 comments on commit b6161e4

Please sign in to comment.