Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
Merge commit '4d62d712788ba65ddf134e6fb6923f22d36f8894' into release/…
Browse files Browse the repository at this point in the history
…v0.5.3

# Conflicts:
#	vendor/composer/InstalledVersions.php
#	vendor/composer/installed.php
  • Loading branch information
jasonbahl committed Jul 19, 2021
2 parents 697d5dd + 4d62d71 commit 1247257
Show file tree
Hide file tree
Showing 54 changed files with 1,974 additions and 1,739 deletions.
10 changes: 8 additions & 2 deletions .env → .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ ADMIN_PATH=/wp-admin

TEST_DB_NAME=wpgraphql_acf_tests
TEST_DB_HOST=127.0.0.1
TEST_DB_USER=wordpress
TEST_DB_PASSWORD=wordpress
TEST_DB_USER=root
TEST_DB_PASSWORD=root
TEST_WP_TABLE_PREFIX=wp_

SKIP_DB_CREATE=false
Expand All @@ -29,3 +29,9 @@ TESTS_ENVS=tests/_envs
#WPGRAPHQL_VERSION=v1.3.3
SKIP_TESTS_CLEANUP=1
SUITES=wpunit

WORDPRESS_DB_HOST=${DB_HOST}
WORDPRESS_DB_USER=${DB_USER}
WORDPRESS_DB_PASSWORD=${DB_PASSWORD}
WORDPRESS_DB_NAME=${DB_NAME}
WORDPRESS_TABLE_PREFIX=${WP_TABLE_PREFIX}
52 changes: 52 additions & 0 deletions .github/workflows/upload-schema-artifact.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Upload Schema Artifact

on:
release:
types: [ published ]

jobs:
run:
runs-on: ubuntu-latest
name: Generate and Upload WPGraphQL for ACF Schema Artifact
services:
mariadb:
image: mariadb
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@v2

- 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: Setup WordPress
run: |
composer run install-test-env
- name: Install WP CLI for ACF
run: |
wp plugin install https://github.com/hoppinger/advanced-custom-fields-wpcli/archive/refs/heads/master.zip --activate --path="/tmp/wordpress"
- name: Import test Field Group
run: |
wp acf import --json_file="${GITHUB_WORKSPACE}/docs/field-group-examples-export.json" --path="/tmp/wordpress"
- name: Generate the Static Schema
run: |
cd /tmp/wordpress/
# Output: /tmp/schema.graphql
wp graphql generate-static-schema
- name: Upload schema as release artifact
uses: softprops/action-gh-release@v1
with:
files: /tmp/schema.graphql
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ vendor/composer/installed.json
vendor/composer/*/
composer.lock
.log
local
wp-content

Loading

0 comments on commit 1247257

Please sign in to comment.