Skip to content

Commit

Permalink
Merge 647976e into 06a1e7e
Browse files Browse the repository at this point in the history
  • Loading branch information
justlevine committed Apr 7, 2024
2 parents 06a1e7e + 647976e commit d01a4c1
Show file tree
Hide file tree
Showing 11 changed files with 121 additions and 84 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-graphiql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ jobs:
build-graphiql:
name: Build GraphiQL
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.PAT }}
Expand Down
22 changes: 10 additions & 12 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,31 @@ on:
- develop
- master

# 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: Check code
strategy:
matrix:
php: [ 8.1 ]

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
with:
access_token: ${{ github.token }}

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
php-version: 8.2
tools: composer:v2
coverage: none

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

Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ on:
schedule:
- cron: '15 21 * * 1'


# 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:
analyze:
name: Analyze
Expand All @@ -38,7 +46,7 @@ jobs:

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

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/deploy-to-wordpress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,23 @@ name: Deploy to WordPress.org
on:
release:
types: [ published ]

jobs:
tag:
name: New release
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
php-version: 8.2
extensions: mbstring, intl
tools: composer

- name: Install PHP dependencies
run: |
composer install --no-dev --optimize-autoloader
Expand All @@ -26,16 +30,19 @@ jobs:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SLUG: wp-graphql

- name: Create Artifact
run: |
composer run-script zip
- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: wp-graphql
path: plugin-build/wp-graphql.zip

- name: Upload release asset
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: plugin-build/wp-graphql.zip
env:
Expand Down
22 changes: 14 additions & 8 deletions .github/workflows/graphiql-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,38 @@ on:
- '.github/workflows/*.yml'
- '!docs/**'

# 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:
e2e-tests:
name: E2E tests on Node ${{ matrix.node-version }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['18']

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

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: 18

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

- name: Install PHP dependencies
run: |
composer install --optimize-autoloader
- name: Install dependencies
uses: ramsey/composer-install@v3
with:
composer-options: "--no-progress"

- name: Install JavaScript dependencies
run: npm ci
Expand Down
25 changes: 14 additions & 11 deletions .github/workflows/schema-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,44 @@ on:
branches:
- develop
- master

# 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: Lint WPGraphQL Schema
services:
mariadb:
image: mariadb:10.8.2
image: mariadb:10
ports:
- 3306:3306
env:
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: Cancel previous runs of this workflow (pull requests only)
if: ${{ github.event_name == 'pull_request' }}
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}

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

- name: Setup PHP w/ Composer & WP-CLI
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 8.2
extensions: mbstring, intl, bcmath, exif, gd, mysqli, opcache, zip, pdo_mysql
coverage: none
tools: composer, wp-cli

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

- name: Setup GraphQL Schema Linter
run: npm install -g graphql-schema-linter@^3.0 graphql@^16
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/sync-develop-with-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@ jobs:
merge-master-back-to-develop:
timeout-minutes: 2
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.SYNC_TOKEN }}

- name: Set Git config
run: |
git config --local user.email "actions@github.com"
git config --local user.name "Github Actions"
- name: Merge master back to develop
run: |
git fetch --unshallow
Expand Down
65 changes: 38 additions & 27 deletions .github/workflows/testing-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ on:
- '.github/workflows/*.yml'
- '!docs/**'

# 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:
name: WordPress ${{ matrix.wordpress }} on PHP ${{ matrix.php }} ${{ matrix.multisite && 'Multisite' || '' }}
Expand All @@ -22,38 +29,42 @@ jobs:
fail-fast: false
matrix:
php: [ '8.2', '8.1' ]
wordpress: [ '6.5', '6.4.3' ]
wordpress: [ '6.5', '6.4', '6.3', '6.2', '6.1' ]
include:
- php: '8.1'
wordpress: '6.2'
# Latest WordPress with special configurations.
- wordpress: '6.5'
php: '8.3'
- wordpress: '6.5'
php: '8.2'
multisite: true
- php: '8.2'
wordpress: '6.5'
- php: '8.3'
wordpress: '6.5'
- php: '8.2'
wordpress: '6.5'
- wordpress: '6.5'
php: '8.2'
coverage: 1
- php: '8.0'
wordpress: '6.3'
- php: '8.1'
wordpress: '6.0'
- php: '7.4'
wordpress: '6.1.1'
- php: '7.3'
wordpress: '5.9'
- php: '8.1'
wordpress: '5.9'
# Lowest PHP version for WordPress versions in matrix.
- wordpress: '6.4'
php: '8.0'
- wordpress: '6.3'
php: '8.0'
- wordpress: '6.2'
php: '8.0'
- wordpress: '6.1'
php: '7.4'
# Older WordPress versions with highest + lowest PHP versions.
- wordpress: '6.0'
php: '8.1'
- wordpress: '6.0'
php: '7.4'
- wordpress: '5.9'
php: '8.1'
- wordpress: '5.9'
php: '7.3'
# Minimum plugin requirement.exclude:
- wordpress: '5.0'
php: '7.3' # Because our build scripts don't go lower than this.

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
with:
access_token: ${{ github.token }}

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -63,7 +74,7 @@ jobs:
extensions: json, mbstring

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

Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/upload-schema-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,22 @@ jobs:
name: Generate and Upload WPGraphQL Schema Artifact
services:
mariadb:
image: mariadb:10.8.2
image: mariadb:10
ports:
- 3306:3306
env:
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
with:
php-version: 8.1
php-version: 8.2
extensions: mbstring, intl, bcmath, exif, gd, mysqli, opcache, zip, pdo_mysql
coverage: none
tools: composer, wp-cli
Expand All @@ -40,7 +41,7 @@ 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
env:
Expand Down

0 comments on commit d01a4c1

Please sign in to comment.