Skip to content

Commit

Permalink
ci: update GH workflows and test against WP 6.5
Browse files Browse the repository at this point in the history
  • Loading branch information
justlevine committed Apr 6, 2024
1 parent 9f72451 commit ecd844e
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 36 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ on:
- main
types: [ opened, synchronize, reopened, labeled ]

# Cancel previous workflow run groups that have not completed.
concurrency:
# Group workflow runs by workflow name, along with the head branch ref of the pull request
# or otherwise the branch or tag ref.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
run:
runs-on: ubuntu-latest
Expand All @@ -28,12 +35,8 @@ jobs:
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- name: Cancel previous runs of this workflow (pull requests only)
if: ${{ github.event_name == 'pull_request_target' }}
uses: styfle/cancel-workflow-action@0.11.0

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

Expand All @@ -46,7 +49,7 @@ jobs:
coverage: none

- name: Install dependencies
uses: ramsey/composer-install@v2
uses: ramsey/composer-install@v3
with:
composer-options: "--no-progress"

Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/code-standard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,20 @@ on:
- develop
- main

# Cancel previous workflow run groups that have not completed.
concurrency:
# Group workflow runs by workflow name, along with the head branch ref of the pull request
# or otherwise the branch or tag ref.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
run:
runs-on: ubuntu-latest
name: Checkout repo
steps:
- name: Cancel previous runs of this workflow (pull requests only)
if: ${{ github.event_name == 'pull_request' }}
uses: styfle/cancel-workflow-action@0.11.0

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -30,7 +33,7 @@ jobs:
coverage: none

- name: Install dependencies
uses: ramsey/composer-install@v2
uses: ramsey/composer-install@v3
with:
composer-options: "--no-progress"

Expand Down
27 changes: 18 additions & 9 deletions .github/workflows/integration-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ on:
- "!docs/**"
types: [ opened, synchronize, reopened, labeled ]

# Cancel previous workflow run groups that have not completed.
concurrency:
# Group workflow runs by workflow name, along with the head branch ref of the pull request
# or otherwise the branch or tag ref.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
continuous_integration:
runs-on: ubuntu-latest
Expand All @@ -24,31 +31,33 @@ jobs:
strategy:
matrix:
php: [ '8.0', '7.4' ]
wordpress: [ '6.4','6.3', '6.2', '6.1', '6.0', '5.9', '5.8', '5.7' ]
wordpress: [ '6.5', '6.4','6.3', '6.2', '6.1', '6.0', '5.9', '5.8', '5.7' ]
include:
- php: '8.1'
wordpress: '6.4'
wordpress: '6.5'
coverage: 1
- php: '8.1'
wordpress: '6.4'
- php: '8.1'
wordpress: '6.3'
- php: '8.1'
wordpress: '6.2'
exclude:
- php: '7.4'
wordpress: '6.5'
- php: '7.4'
wordpress: '6.4'
- php: '7.4'
wordpress: '6.3'
- php: '7.4'
wordpress: '6.2'
- php: "8.0"
wordpress: "6.5"
fail-fast: false

steps:
- name: Cancel previous runs of this workflow (pull requests only)
if: ${{ github.event_name == 'pull_request_target' }}
uses: styfle/cancel-workflow-action@0.11.0

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

Expand All @@ -60,7 +69,7 @@ jobs:
tools: composer:v2

- name: Install dependencies
uses: ramsey/composer-install@v2
uses: ramsey/composer-install@v3

- name: Build "testing" Docker Image
env:
Expand Down Expand Up @@ -124,7 +133,7 @@ jobs:

- name: Push CodeCoverage to CodeClimate
if: ${{ matrix.coverage == 1 }}
uses: paambaati/codeclimate-action@v3.2.0
uses: paambaati/codeclimate-action@v5
env:
CC_TEST_REPORTER_ID: c8f992fb9d2400821643b093de584af5a3c8d0a8f1f6f4e000592ccf0270ee29
with:
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/schema-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ on:
- main
types: [ opened, synchronize, reopened, labeled ]

# Cancel previous workflow run groups that have not completed.
concurrency:
# Group workflow runs by workflow name, along with the head branch ref of the pull request
# or otherwise the branch or tag ref.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
run:
runs-on: ubuntu-latest
Expand All @@ -32,7 +39,7 @@ jobs:
uses: styfle/cancel-workflow-action@0.11.0

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

Expand All @@ -45,9 +52,9 @@ jobs:
tools: composer:v2, wp-cli

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 20.x

- name: Setup GraphQL Schema Linter
run: npm install -g graphql-schema-linter@^3.0 graphql@^16
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/upload-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: mbstring, intl
tools: composer

- name: Install dependencies
run: |
composer install --no-dev --optimize-autoloader
Expand All @@ -25,13 +27,15 @@ jobs:
mkdir -p plugin-build/wp-graphql-gravity-forms
rsync -rc --exclude-from=.distignore --exclude=plugin-build . plugin-build/wp-graphql-gravity-forms/ --delete --delete-excluded -v
cd plugin-build ; zip -r wp-graphql-gravity-forms.zip wp-graphql-gravity-forms
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wp-graphql-gravity-forms
path: plugin-build/wp-graphql-gravity-forms.zip

- name: Upload release asset
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: plugin-build/wp-graphql-gravity-forms.zip
env:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/upload-schema-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ jobs:
MYSQL_ROOT_PASSWORD: root
# Ensure docker waits for mariadb to start
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP w/ Composer & WP-CLI
uses: shivammathur/setup-php@v2
Expand All @@ -42,6 +43,6 @@ jobs:
wp graphql generate-static-schema
- name: Upload schema as release artifact
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: /tmp/schema.graphql
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

- chore: update Composer deps and lint.
- chore: lock WPBrowser to <3.5.0 to prevent conflicts with Codeception.
- ci: Update GitHub Actions to latest versions.
- ci: Test plugin compatibility with WordPress 6.5.0.

## v0.12.5

Expand Down
10 changes: 5 additions & 5 deletions bin/run-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ print_usage_instructions() {
echo " composer build-app"
echo " composer run-app"
echo ""
echo " WP_VERSION=6.4 PHP_VERSION=8.1 composer build-app"
echo " WP_VERSION=6.4 PHP_VERSION=8.1 composer run-app"
echo " WP_VERSION=6.5 PHP_VERSION=8.1 composer build-app"
echo " WP_VERSION=6.5 PHP_VERSION=8.1 composer run-app"
echo ""
echo " WP_VERSION=6.4 PHP_VERSION=8.1 bin/run-docker.sh build -a"
echo " WP_VERSION=6.4 PHP_VERSION=8.1 bin/run-docker.sh run -a"
echo " WP_VERSION=6.5 PHP_VERSION=8.1 bin/run-docker.sh build -a"
echo " WP_VERSION=6.5 PHP_VERSION=8.1 bin/run-docker.sh run -a"
exit 1
}

Expand All @@ -29,7 +29,7 @@ if [ $# -eq 0 ]; then
fi

TAG=${TAG-latest}
WP_VERSION=${WP_VERSION-6.4}
WP_VERSION=${WP_VERSION-6.5}
PHP_VERSION=${PHP_VERSION-8.1}

BUILD_NO_CACHE=${BUILD_NO_CACHE-}
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Contributors: justlevine, kellenmace, mtdbyanechko, tinytoolbox
Tags: Forms, GraphQL, Gatsby, Headless, GF, Gravity, WPGraphQL, React
Requires at least: 5.4.1
Tested up to: 6.4.3
Tested up to: 6.5
Requires PHP: 7.4
Requires Gravity Forms: 2.5.0
Requires WPGraphQL: 1.9.0
Expand Down
2 changes: 1 addition & 1 deletion wp-graphql-gravity-forms.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Text Domain: wp-graphql-gravity-forms
* Domain Path: /languages
* Requires at least: 5.4.1
* Tested up to: 6.4.3
* Tested up to: 6.5
* Requires PHP: 7.4
* WPGraphQL requires at least: 1.9.0
* GravityForms requires at least: 2.5.0
Expand Down

0 comments on commit ecd844e

Please sign in to comment.