Skip to content

Commit

Permalink
Increase minimum supported WP version
Browse files Browse the repository at this point in the history
Refresh the intregrations CI config.
  • Loading branch information
GaryJones committed Feb 7, 2024
1 parent 3d156c9 commit ee98179
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 28 deletions.
46 changes: 19 additions & 27 deletions .github/workflows/integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,36 @@ on:
jobs:
test:
name: WP ${{ matrix.wordpress }} on PHP ${{ matrix.php }}
# Ubuntu-20.x includes MySQL 8.0, which causes `caching_sha2_password` issues with PHP < 7.4
# https://www.php.net/manual/en/mysqli.requirements.php
# TODO: change to ubuntu-latest when we no longer support PHP < 7.4
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.allowed_failure }}

env:
WP_VERSION: ${{ matrix.wordpress }}

strategy:
matrix:
wordpress: ["5.5", "5.6", "5.7"]
php: ["7.4", "8.0", "8.1"]
wordpress: [ '5.9', '6.4' ]
php: [ '7.4', '8.3' ]
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"
# Check upcoming WP.
- php: '8.3'
wordpress: 'trunk'
allowed_failure: true
# Check upcoming PHP.
# - php: '8.4'
# wordpress: 'latest'
# allowed_failure: true
- php: '8.2'
extensions: pcov
ini-values: pcov.directory=., "pcov.exclude=\"~(vendor|tests)~\""
coverage: pcov
exclude:
- php: "8.0"
wordpress: "5.5"
allowed_failure: false
fail-fast: false

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
Expand All @@ -52,22 +55,11 @@ jobs:
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"

# Setup PCOV since we're using PHPUnit < 8 which has it integrated. Requires PHP 7.1.
# Ignore platform reqs to make it install on PHP 8.
# https://github.com/krakjoe/pcov-clobber
- name: Setup PCOV
if: ${{ matrix.php == 8.0 }}
run: |
composer require pcov/clobber --ignore-platform-reqs
vendor/bin/pcov clobber
- name: Setup Problem Matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Install Composer dependencies
uses: ramsey/composer-install@v1
with:
composer-options: "${{ matrix.composer-options }}"
uses: ramsey/composer-install@v2

- name: Start MySQL Service
run: sudo systemctl start mysql.service
Expand All @@ -76,10 +68,10 @@ jobs:
run: composer prepare-ci

- name: Run integration tests (single site)
if: ${{ matrix.php != 8.0 }}
if: ${{ matrix.php != 8.2 }}
run: composer test
- name: Run integration tests (single site with code coverage)
if: ${{ matrix.php == 8.0 }}
if: ${{ matrix.php == 8.2 }}
run: composer coverage-ci
- name: Run integration tests (multisite)
run: composer test-ms
2 changes: 1 addition & 1 deletion .phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<rule ref="WordPress-Docs"/>
<!-- For help in understanding these custom sniff properties:
https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties -->
<config name="minimum_supported_wp_version" value="5.5"/>
<config name="minimum_supported_wp_version" value="5.9"/>

<!-- Rules: WordPress VIP - see
https://github.com/Automattic/VIP-Coding-Standards -->
Expand Down

0 comments on commit ee98179

Please sign in to comment.