Skip to content

Commit 5f7ac19

Browse files
authored
Merge pull request #400 from wpengine/chore/wordpress-6.9-compatibility
chore: add WordPress 6.9 to test matrix
2 parents 812c30f + 4b90611 commit 5f7ac19

File tree

8 files changed

+30
-26
lines changed

8 files changed

+30
-26
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@wpengine/wp-graphql-content-blocks": patch
3+
---
4+
5+
Add WordPress 6.9 compatibility and update test matrix to support WordPress 6.9, 6.8 with PHP 8.3, 8.1.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
-- Create test database for PHPUnit tests
2+
CREATE DATABASE IF NOT EXISTS wordpress_unit_test;
3+
GRANT ALL PRIVILEGES ON wordpress_unit_test.* TO 'root'@'%';
4+
GRANT ALL PRIVILEGES ON wordpress_unit_test.* TO 'wordpress'@'%';
5+
FLUSH PRIVILEGES;

.env.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ MYSQL_USER=${DB_USER}
4949
MYSQL_PASSWORD=${DB_PASSWORD}
5050

5151
# Change these to test different versions of WP, WPGraphQL, ACF etc.
52-
WP_VERSION=6.2
53-
PHP_VERSION=8.0
52+
WP_VERSION=6.9
53+
PHP_VERSION=8.1
5454
WPGRAPHQL_VERSION=latest

.github/actions/setup-wordpress/action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: Set up WordPress
22
description: Sets up WordPress. Assumes mariadb is available as a service.
33

4+
inputs:
5+
wp-version:
6+
description: 'WordPress version to install'
7+
required: false
8+
default: '6.9'
9+
410
runs:
511
using: 'composite'
612
steps:
@@ -23,6 +29,8 @@ runs:
2329

2430
- name: Setup WordPress
2531
shell: bash
32+
env:
33+
WP_VERSION: ${{ inputs.wp-version }}
2634
run: |
2735
cp .env.dist .env
2836
composer run install-test-env

.github/workflows/schema-linter.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838

3939
- name: Setup WordPress
4040
uses: ./.github/actions/setup-wordpress
41+
with:
42+
wp-version: '6.9'
4143

4244
- name: Setup GraphQL Schema Linter
4345
run: npm install -g graphql-schema-linter@^3.0 graphql@^16
@@ -77,7 +79,11 @@ jobs:
7779
name: schema.graphql
7880
path: /tmp/schema.graphql
7981

82+
# Schema changes between WordPress versions are expected and not regressions in this plugin.
83+
# The inspector runs to document changes for release notes, but doesn't block CI.
84+
# Update wp-version above when releasing a new version with updated "Tested up to:" header.
8085
- name: Run Schema Inspector
86+
continue-on-error: true
8187
run: |
8288
# This schema and previous release schema
8389
node_modules/.bin/graphql-inspector diff /tmp/${{ steps.get-latest-tag.outputs.tag }}.graphql /tmp/schema.graphql

.github/workflows/test-plugin-nightly.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ jobs:
1616
- name: Create Docker Containers
1717
env:
1818
PHP_VERSION: 8.2
19-
WP_VERSION: 6.8
19+
WP_VERSION: 6.9
2020
working-directory: ./
2121
run: |
2222
docker compose build \
23-
--build-arg WP_VERSION=6.8 \
23+
--build-arg WP_VERSION=6.9 \
2424
--build-arg PHP_VERSION=8.2
2525
docker compose up -d
2626

.github/workflows/test-plugin.yml

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,8 @@ jobs:
1111
runs-on: ubuntu-22.04
1212
strategy:
1313
matrix:
14-
php: [ '8.2', '7.4' ]
15-
wordpress: [ '6.8', '6.7', '6.6','6.5', '6.4', '6.3', '6.2', '6.1' ]
16-
exclude:
17-
- php: 8.2
18-
wordpress: 6.1
19-
- php: 7.4
20-
wordpress: 6.2
21-
- php: 7.4
22-
wordpress: 6.3
23-
- php: 7.4
24-
wordpress: 6.4
25-
- php: 7.4
26-
wordpress: 6.5
27-
- php: 7.4
28-
wordpress: 6.6
29-
- php: 7.4
30-
wordpress: 6.7
31-
- php: 7.4
32-
wordpress: 6.8
14+
php: [ '8.3', '8.1' ]
15+
wordpress: [ '6.9', '6.8', '6.7', '6.6' ]
3316
fail-fast: false
3417
name: WordPress ${{ matrix.wordpress }}, PHP ${{ matrix.php }}
3518
steps:

bin/_lib.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,6 @@ install_db() {
9292
fi
9393
fi
9494

95-
# Always disable SSL for local test DB connections (fixes WP 6.8 DB creation issues)
96-
EXTRA="$EXTRA --ssl=false"
97-
9895
# create database
9996
if [ $(mysql --user="$DB_USER" --password="$DB_PASS"$EXTRA --execute='show databases;' | grep ^$DB_NAME$) ]
10097
then

0 commit comments

Comments
 (0)