This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #250 from wp-graphql/release/v0.5.0
Release/v0.5.0
- Loading branch information
Showing
81 changed files
with
5,955 additions
and
9,550 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
service_name: travis-ci | ||
coverage_clover: tests/_output/coverage.xml | ||
json_path: tests/_output/coveralls-upload.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# The following files should be ignored: | ||
# - unencrypted sensitive data | ||
# - files that are not checked into the code repository | ||
# - files that are not relevant to the Docker build | ||
|
||
.git | ||
.idea | ||
bin | ||
docker-output | ||
docs | ||
img | ||
|
||
tests/_output | ||
!tests/_output/.gitignore | ||
tests/_support/_generated | ||
!tests/_support/_generated/.gitignore | ||
|
||
vendor | ||
!vendor/autoload.php | ||
!vendor/ivome/graphql-relay-php/src | ||
!vendor/webonyx/graphql-php/src | ||
!vendor/composer | ||
|
||
.dockerignore | ||
.gitignore | ||
.travis.yml | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
Dockerfile* | ||
ISSUE_TEMPLATE.md | ||
LICENSE | ||
PULL_REQUEST_TEMPLATE.md | ||
README.md | ||
readme.txt | ||
run-docker*.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
DB_NAME=wordpress | ||
DB_HOST=app_db | ||
DB_USER=wordpress | ||
DB_PASSWORD=wordpress | ||
WP_TABLE_PREFIX=wp_ | ||
WP_URL=http://localhost | ||
WP_DOMAIN=localhost | ||
ADMIN_EMAIL=admin@example.com | ||
ADMIN_USERNAME=admin | ||
ADMIN_PASSWORD=password | ||
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_WP_TABLE_PREFIX=wp_ | ||
|
||
SKIP_DB_CREATE=false | ||
TEST_WP_ROOT_FOLDER=/tmp/wordpress | ||
TEST_ADMIN_EMAIL=admin@wp.test | ||
|
||
TESTS_DIR=tests | ||
TESTS_OUTPUT=tests/_output | ||
TESTS_DATA=tests/_data | ||
TESTS_SUPPORT=tests/_support | ||
TESTS_ENVS=tests/_envs | ||
|
||
#WPGRAPHQL_VERSION=v1.3.3 | ||
SKIP_TESTS_CLEANUP=1 | ||
SUITES=wpunit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
name: Testing Integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- master | ||
pull_request: | ||
branches: | ||
- develop | ||
- master | ||
paths: | ||
- '**.php' | ||
- '!docs/**' | ||
|
||
jobs: | ||
continuous_integration: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php: [ '7.3', '7.4' ] | ||
wordpress: [ '5.6', '5.5.3', '5.4.2' ] | ||
include: | ||
- php: '7.4' | ||
wordpress: '5.6' | ||
coverage: 1 | ||
- php: '7.4' | ||
wordpress: '5.6' | ||
WPGRAPHQL_VERSION: 'v1.3.5' | ||
- php: '7.4' | ||
wordpress: '5.6' | ||
WPGRAPHQL_VERSION: 'v1.2.6' | ||
- php: '7.4' | ||
wordpress: '5.6' | ||
WPGRAPHQL_VERSION: 'v1.1.8' | ||
- php: '7.4' | ||
wordpress: '5.6' | ||
WPGRAPHQL_VERSION: 'v1.0.5' | ||
- php: '7.4' | ||
wordpress: '5.6' | ||
WPGRAPHQL_VERSION: 'v0.15.5' | ||
- php: '7.4' | ||
wordpress: '5.6' | ||
WPGRAPHQL_VERSION: 'v0.14.0' | ||
- php: '7.4' | ||
wordpress: '5.6' | ||
WPGRAPHQL_VERSION: 'v0.13.3' | ||
- php: '7.4' | ||
wordpress: '5.6' | ||
WPGRAPHQL_VERSION: 'v0.12.3' | ||
- php: '7.4' | ||
wordpress: '5.6' | ||
WPGRAPHQL_VERSION: 'v0.11.0' | ||
- php: '7.4' | ||
wordpress: '5.6' | ||
WPGRAPHQL_VERSION: 'v0.11.0' | ||
- php: '7.4' | ||
wordpress: '5.5.3' | ||
- php: '7.4' | ||
wordpress: '5.4.2' | ||
- php: '7.3' | ||
wordpress: '5.6' | ||
- php: '7.3' | ||
wordpress: '5.5.3' | ||
- php: '7.3' | ||
wordpress: '5.4.2' | ||
fail-fast: false | ||
name: WordPress ${{ matrix.wordpress }} on PHP ${{ matrix.php }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: json, mbstring, zip, unzip | ||
|
||
- name: Get Composer Cache Directory | ||
id: composercache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composercache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- name: Install dependencies | ||
run: composer install | ||
|
||
- name: Build "testing" Docker Image | ||
env: | ||
PHP_VERSION: ${{ matrix.php }} | ||
WP_VERSION: ${{ matrix.wordpress }} | ||
run: composer build-test | ||
|
||
- name: Run Tests w/ Docker. | ||
env: | ||
COVERAGE: ${{ matrix.coverage }} | ||
USING_XDEBUG: ${{ matrix.coverage }} | ||
DEBUG: ${{ matrix.debug }} | ||
SKIP_TESTS_CLEANUP: ${{ matrix.coverage }} | ||
run: composer run-test | ||
|
||
- name: Push Codecoverage to Coveralls.io | ||
if: ${{ matrix.coverage == 1 }} | ||
env: | ||
COVERALLS_RUN_LOCALLY: 1 | ||
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: vendor/bin/php-coveralls -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ vendor/* | |
vendor/composer/installed.json | ||
vendor/composer/*/ | ||
composer.lock | ||
.log |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# Using Docker For Local Development | ||
|
||
## WordPress Site | ||
|
||
The `app` docker image starts a running WordPress site with the local wp-graphql-acf directory installed and activated. Local changes to the source code is immediately reflects in the app. | ||
|
||
1. Build the plugin. | ||
1.1 `composer install` or `docker run -v $PWD:/app composer --ignore-platform-reqs install` | ||
1. Run `composer build-app` to build the `app` docker image. | ||
1. Run `composer build-test` to build the `testing` docker image. | ||
1. Run `composer run-app` to start the WordPress site. | ||
1. Browse to http://localhost:8091/ to access the running WordPress app. | ||
1. Browse to http://localhost:8091/wp-admin/ to access the admin dashboard. Username is 'admin'. Password is 'password'. | ||
|
||
## Testing Suite | ||
|
||
The `testing` docker image starts a running WordPress and runs the codeception test suites. | ||
|
||
1. Run `composer build-test` to build the `testing` docker image. | ||
1. Run `composer run-test` to start the `testing` image and run the codeception tests. | ||
|
||
# Using XDebug | ||
|
||
## Local WordPress Site With XDebug | ||
Use an environment variable USING_XDEBUG to start the docker image and WordPress with xdebug configured to use port 9003 to communicated with your IDE. | ||
|
||
``` | ||
export USING_XDEBUG=1 | ||
composer run-app | ||
``` | ||
|
||
Start the debugger in your IDE. Set breakpoints. | ||
|
||
Load the app in http://localhost:8091/. | ||
|
||
## Using XDebug With Tests | ||
|
||
Use the environment variable USING_XDEBUG to run tests with xdebug configured to use port 9003 to communicated with your IDE. | ||
|
||
``` | ||
export USING_XDEBUG=1 | ||
composer run-test | ||
``` | ||
|
||
Start the debugger in your IDE. Set breakpoints. | ||
|
||
## Configure VSCode IDE Launch File | ||
|
||
Create or add the following configuration to your .vscode/launch.json in the root directory. Restart VSCode. Start the debug listener before running the app or testing images. | ||
|
||
If you have WordPress core files in a directory for local development, you can add the location to the `pathMappings` for debug step through. | ||
|
||
``` | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Listen for Xdebug", | ||
"type": "php", | ||
"request": "launch", | ||
"port": 9003, | ||
"xdebugSettings": { | ||
"max_children": 128, | ||
"max_data": 1024, | ||
"max_depth": 3, | ||
"show_hidden": 1 | ||
}, | ||
"pathMappings": { | ||
"/var/www/html/wp-content/plugins/wp-graphql-acf": "${workspaceFolder}", | ||
"/var/www/html/wp-content/plugins/wp-graphql": "${workspaceFolder}../wp-graphql", | ||
"/var/www/html": "${workspaceFolder}/wordpress", | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.