Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/schema-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ jobs:
with:
wp-version: '6.9'

- name: Setup GraphQL Schema Linter
run: npm install -g graphql-schema-linter@^3.0 graphql@^16
# Installed globally: a local install in the repo root would also install the plugin's devDependencies.
- name: Setup GraphQL Schema Linter and Inspector
run: npm install -g graphql-schema-linter@^3.0 graphql@^16 @graphql-inspector/cli @graphql-inspector/config

- name: Generate the Static Schema
run: |
Expand All @@ -59,8 +60,12 @@ jobs:
graphql-schema-linter /tmp/schema.graphql || true

- name: Get Latest tag
uses: actions-ecosystem/action-get-latest-tag@v1
id: get-latest-tag
env:
GH_TOKEN: ${{ github.token }}
run: |
tag=$(gh release view --repo "$GITHUB_REPOSITORY" --json tagName --jq .tagName)
echo "tag=$tag" >> "$GITHUB_OUTPUT"

- name: Test Schema for breaking changes
run: |
Expand All @@ -69,11 +74,6 @@ jobs:
- name: Get Previous Released Schema
run: curl 'https://github.com/wpengine/wp-graphql-content-blocks/releases/download/${{ steps.get-latest-tag.outputs.tag }}/schema.graphql' -L --output /tmp/${{ steps.get-latest-tag.outputs.tag }}.graphql

# https://github.com/marketplace/actions/graphql-inspector
- name: Install Schema Inspector
run: |
npm install @graphql-inspector/config @graphql-inspector/cli graphql

- uses: actions/upload-artifact@v7
with:
name: schema.graphql
Expand All @@ -86,4 +86,4 @@ jobs:
continue-on-error: true
run: |
# This schema and previous release schema
node_modules/.bin/graphql-inspector diff /tmp/${{ steps.get-latest-tag.outputs.tag }}.graphql /tmp/schema.graphql
graphql-inspector diff /tmp/${{ steps.get-latest-tag.outputs.tag }}.graphql /tmp/schema.graphql
11 changes: 10 additions & 1 deletion .github/workflows/test-plugin-gutenberg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v7

# Backgrounded so the MySQL pull and first boot overlap the image build.
- name: Start database
run: nohup docker compose up -d db > /tmp/db-up.log 2>&1 &

- name: Create Docker Containers
env:
DOCKER_BUILDKIT: 1
Expand All @@ -38,7 +42,12 @@ jobs:
docker compose build \
--build-arg WP_VERSION="$WP_VERSION" \
--build-arg PHP_VERSION="$PHP_VERSION"
docker compose up -d
# The wordpress service links to db, so it can't start before the db container exists.
if ! timeout 120 bash -c 'until [ -n "$(docker compose ps -q db)" ]; do sleep 1; done'; then
cat /tmp/db-up.log
exit 1
fi
docker compose up -d --no-deps wordpress

- name: Wait for db
run: |
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/test-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v7

# Backgrounded so the MySQL pull and first boot overlap the image build.
- name: Start database
run: nohup docker compose up -d db > /tmp/db-up.log 2>&1 &

- name: Create Docker Containers
env:
PHP_VERSION: ${{ matrix.php }}
Expand All @@ -49,7 +53,12 @@ jobs:
docker compose build \
--build-arg WP_VERSION=${{ matrix.wordpress }} \
--build-arg PHP_VERSION=${{ matrix.php }}
docker compose up -d
# The wordpress service links to db, so it can't start before the db container exists.
if ! timeout 120 bash -c 'until [ -n "$(docker compose ps -q db)" ]; do sleep 1; done'; then
cat /tmp/db-up.log
exit 1
fi
docker compose up -d --no-deps wordpress

- name: Wait for db
run: |
Expand Down
Loading