Skip to content

Commit

Permalink
Merge 33c6e97 into 06a1e7e
Browse files Browse the repository at this point in the history
  • Loading branch information
justlevine committed Apr 7, 2024
2 parents 06a1e7e + 33c6e97 commit ea86385
Show file tree
Hide file tree
Showing 14 changed files with 179 additions and 131 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
89 changes: 51 additions & 38 deletions .github/workflows/deploy-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,62 +14,75 @@ jobs:
strategy:
matrix:
php: [ '8.1', '8.0', '7.4', '7.3' ]
wordpress: [ '6.2', '6.1', '6.0', '5.9', '5.8', '5.7.2', '5.6', '5.5.3' ]
wordpress: [ '6.5', '6.4', '6.3', '6.2', '6.1', '6.0', '5.9', '5.8', '5.7', '5.6', '5.5' ]
include:
- php: '8.3'
wordpress: '6.5'
- php: '8.2'
wordpress: '6.5'
- php: '8.1'
wordpress: '6.5'
- php: '8.2'
wordpress: '6.1'
- php: '8.2'
wordpress: '6.2'
- php: '8.2'
wordpress: '6.4.0'
- php: '8.2'
wordpress: '6.3'
- php: '8.1'
wordpress: '6.3'
# WordPress versions above the PHP testing matrix.
- wordpress: '6.5'
php: '8.3'
- wordpress: '6.5'
php: '8.2'
- wordpress: '6.4'
php: '8.2'
- wordpress: '6.3'
php: '8.2'
- wordpress: '6.2'
php: '8.2'
- wordpress: '6.1'
php: '8.2'
exclude:
- php: '8.1'
wordpress: '5.5.3'
- php: '8.1'
wordpress: '5.6'
- php: '8.1'
wordpress: '5.7.2'
- php: '8.0'
wordpress: '5.5.3'
- php: '7.3'
wordpress: '6.0'
- php: '7.3'
wordpress: '6.1'
- php: '7.3'
wordpress: '6.2'
# This is a temporary exclusion until a php74 image is released. See #2780
- php: '7.4'
wordpress: '6.2'
# WordPress versions that don't have a PHP Docker image available (too new)
- wordpress: '6.5'
php: '8.0'
- wordpress: '6.5'
php: '7.4'
- wordpress: '6.5'
php: '7.3'
- wordpress: '6.4'
php: '7.4'
- wordpress: '6.4'
php: '7.3'
- wordpress: '6.3'
php: '7.4'
- wordpress: '6.3'
php: '7.3'
- wordpress: '6.2'
php: '7.4'
- wordpress: '6.2'
php: '7.3'
- wordpress: '6.1'
php: '7.3'
- wordpress: '6.0'
php: '7.3'
# WordPress versions that don't support PHP versions in the matrix (too old)
- wordpress: '5.7'
php: '8.1'
- wordpress: '5.6'
php: '8.1'
- wordpress: '5.5'
php: '8.1'
- wordpress: '5.5'
php: '8.0'

fail-fast: false
name: WordPress ${{ matrix.wordpress }} on PHP ${{ matrix.php }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

# Use magic to get the tag number from /ref/heads/v0.1.2 in GITHUB_REF
- name: Get the version
id: vars
run: echo "tag=$(echo ${GITHUB_REF:11})" >> $GITHUB_OUTPUT

- name: Log in to the Container registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .
push: true
Expand All @@ -82,7 +95,7 @@ jobs:
WP_VERSION=${{ matrix.wordpress }}
- name: Build and push Docker testing image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .
push: true
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

0 comments on commit ea86385

Please sign in to comment.