Skip to content

Commit

Permalink
Merge 8a3d8f8 into 181c9e0
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonbahl committed Apr 10, 2024
2 parents 181c9e0 + 8a3d8f8 commit 8e81b05
Show file tree
Hide file tree
Showing 62 changed files with 16,810 additions and 44,183 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
83 changes: 51 additions & 32 deletions .github/workflows/deploy-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,56 +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.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 @@ -76,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
111 changes: 62 additions & 49 deletions .github/workflows/graphiql-e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,67 @@
name: GraphiQL End-to-End Tests

on:
workflow_dispatch:
push:
branches:
- develop
- master
pull_request:
branches:
- develop
- master
paths:
- '**.js'
- '.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:
admin:
name: GraphiQL E2E Tests
runs-on: ubuntu-latest
if: ${{ github.repository == 'wp-graphql/wp-graphql' || github.event_name == 'pull_request' }}
strategy:
fail-fast: false
matrix:
node: ['16.13.0']

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

- name: Use desired version of NodeJS
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: npm

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

- name: Install Composer Dependencies
run: |
composer install --no-dev
- name: Install NPM Dependencies and Build the GraphiQL App
id: install-and-build
run: |
npm ci && npm run build
- name: Install WordPress
run: |
npm run wp-env start
- name: Running the tests
run: |
npm run test-e2e
e2e-tests:
name: E2E tests on Node ${{ matrix.node-version }}
runs-on: ubuntu-latest

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

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

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

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

- name: Install JavaScript dependencies
run: npm ci

- name: Build Assets
run: npm run build

- name: Install Playwright dependencies
run: |
npx playwright install chromium firefox webkit --with-deps
- name: Start WordPress Environment
run: npm run wp-env -- start

- name: Run E2E tests
run: npm run test:e2e

- name: Stop WordPress Environment
run: npm run wp-env -- stop

0 comments on commit 8e81b05

Please sign in to comment.