Skip to content

Commit

Permalink
Merge 1610fda into c34ffed
Browse files Browse the repository at this point in the history
  • Loading branch information
kidunot89 committed Nov 26, 2019
2 parents c34ffed + 1610fda commit 5dcc41e
Show file tree
Hide file tree
Showing 72 changed files with 1,999 additions and 645 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.env
.github_changelog_generator
.travis.yml
.travis.yml
codeception.yml
6 changes: 5 additions & 1 deletion .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@ TESTS_DIR=tests
TESTS_OUTPUT=tests/_output
TESTS_DATA=tests/_data
TESTS_SUPPORT=tests/_support
TESTS_ENVS=tests/_envs
TESTS_ENVS=tests/_envs

CORE_BRANCH=develop
JWT_AUTH_BRANCH=master
SKIP_PCOV_CLOBBER_CLEANUP=false
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ node_modules/
vendor/*
!vendor/autoload.php
!vendor/composer
!vendor/firebase
vendor/composer/installed.json
vendor/composer/*/
!tests
Expand Down
19 changes: 8 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ branches:
- master
- release-v0.1.2
- release-v0.2.2
- release-v0.3.0
- release-v0.3.1

cache:
apt: true
Expand All @@ -27,17 +27,13 @@ cache:
matrix:
include:
- php: 7.3
env: PHP_VERSION=7.3 WP_VERSION=5.2 COVERAGE=1
env: PHP_VERSION=7.3 WP_VERSION=5.3
- php: 7.3
env: PHP_VERSION=7.3 PHPCS=1
- php: 7.2
env: PHP_VERSION=7.2 WP_VERSION=5.2
env: PHP_VERSION=7.2 WP_VERSION=5.3
- php: 7.2
env: PHP_VERSION=7.2 WP_VERSION=4.9
- php: 7.1
env: PHP_VERSION=7.1 WP_VERSION=5.2
- php: 7.1
env: PHP_VERSION=7.1 WP_VERSION=4.9
- php: 7.0
env: PHP_VERSION=7.0 WP_VERSION=5.0
- php: 7.0
Expand All @@ -46,6 +42,10 @@ matrix:
env: PHP_VERSION=5.6 WP_VERSION=5.0
- php: 5.6
env: PHP_VERSION=5.6 WP_VERSION=4.9
- php: 7.1
env: PHP_VERSION=7.1 WP_VERSION=5.3
- php: 7.1
env: PHP_VERSION=7.1 WP_VERSION=4.9 COVERAGE=1
allow_failures:
- env: PHP_VERSION=5.6 WP_VERSION=5.0
- env: PHP_VERSION=5.6 WP_VERSION=4.9
Expand Down Expand Up @@ -93,8 +93,7 @@ script:
# Execute unit tests with coverage if specified, otherwise without coverage
- |
if [ ! -z "$WP_VERSION" ]; then
docker-compose run --rm \
-e SUITES='acceptance;functional;wpunit' \
docker-compose run --rm \
-e COVERAGE=${COVERAGE:-0} \
-e DEBUG=${DEBUG:-0} \
testing --scale app=0
Expand All @@ -114,7 +113,5 @@ after_success:
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar
chmod +x php-coveralls.phar
sed -i 's/\/var\/www\/html\/wp-content\/plugins\/wp-graphql-woocommerce\///g' tests/_output/coverage.xml
travis_retry php php-coveralls.phar -v
fi
69 changes: 0 additions & 69 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@

[Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.2.2-beta...v0.3.0-beta)

**Merged pull requests:**

- Release-v0.2.2 [\#154](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/154) ([kidunot89](https://github.com/kidunot89))

## [v0.2.2-beta](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.2.2-beta) (2019-10-24)

[Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.2.1-beta...v0.2.2-beta)
Expand All @@ -16,9 +12,6 @@

- Sorting of products, Categories etc [\#138](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/138)
- Accessing meta\_data product property? [\#121](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/121)
- Improved ordering for some connections [\#145](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/145) ([kidunot89](https://github.com/kidunot89))
- "product\_connection\_catalog\_visibility" hook implemented. [\#142](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/142) ([kidunot89](https://github.com/kidunot89))
- "format" arg added to Product description fields [\#139](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/139) ([kidunot89](https://github.com/kidunot89))

**Fixed:**

Expand All @@ -27,10 +20,6 @@
- Extension breaks the hierarchy between pages [\#122](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/122)
- Order id undefined [\#119](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/119)
- categoryNameIn not filtering [\#116](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/116)
- Fixes product taxonomy hierachy resolution [\#150](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/150) ([kidunot89](https://github.com/kidunot89))
- Adds WPGraphQL JWT Auth fields to Customer type and mutations [\#148](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/148) ([kidunot89](https://github.com/kidunot89))
- Escape hatch added on non-GraphQL requests. [\#146](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/146) ([kidunot89](https://github.com/kidunot89))
- Release v0.2.1 [\#114](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/114) ([kidunot89](https://github.com/kidunot89))

**Closed issues:**

Expand All @@ -39,20 +28,10 @@
- Price Type, and name not showing up for product as Typed values [\#137](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/137)
- Add AND and OR statement to where clause. [\#120](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/120)

**Merged pull requests:**

- FUNDING.yml added. [\#151](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/151) ([kidunot89](https://github.com/kidunot89))
- CONTRIBUTING.md added [\#144](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/144) ([kidunot89](https://github.com/kidunot89))
- v0.2.1 hotfix to develop [\#135](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/135) ([kidunot89](https://github.com/kidunot89))

## [v0.2.1-beta](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.2.1-beta) (2019-08-27)

[Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.2.0-beta...v0.2.1-beta)

**Breaking changes:**

- Release v0.2.0 [\#96](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/96) ([kidunot89](https://github.com/kidunot89))

**Enhancements:**

- Hooks for mutations [\#108](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/108)
Expand All @@ -65,7 +44,6 @@

- customerRegister mutation resolves wrong object for `viewer` field [\#111](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/111)
- I cant see the category thumbnail [\#93](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/93)
- Session header bugfix [\#113](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/113) ([kidunot89](https://github.com/kidunot89))

## [v0.2.0-beta](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.2.0-beta) (2019-07-11)

Expand All @@ -74,24 +52,15 @@
**Fixed:**

- Custom attributes of variable products cannot be queried. [\#87](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/87)
- Release v0.1.2 [\#86](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/86) ([kidunot89](https://github.com/kidunot89))

**Closed issues:**

- Customer id doesn't match user id [\#90](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/90)

**Merged pull requests:**

- CHANGELOG updated [\#92](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/92) ([kidunot89](https://github.com/kidunot89))

## [v0.1.2-beta](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.1.2-beta) (2019-06-23)

[Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.1.1-beta...v0.1.2-beta)

**Fixed:**

- Release v0.1.1 [\#81](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/81) ([kidunot89](https://github.com/kidunot89))

**Closed issues:**

- Tests needed [\#46](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/46)
Expand All @@ -100,10 +69,6 @@

[Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.1.0-beta...v0.1.1-beta)

**Breaking changes:**

- Release v0.1.0 [\#54](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/54) ([kidunot89](https://github.com/kidunot89))

**Enhancements:**

- Add format argument to product pricing fields [\#75](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/75)
Expand All @@ -113,7 +78,6 @@
**Fixed:**

- Provide guest user authentication [\#79](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/79)
- Codeception versioning problem in Travis-CI build [\#77](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/77) ([kidunot89](https://github.com/kidunot89))

**Closed issues:**

Expand All @@ -127,10 +91,6 @@

- Release v0.0.4 Summary [\#66](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/66)

**Merged pull requests:**

- Release v0.0.4 [\#65](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/65) ([kidunot89](https://github.com/kidunot89))

## [v0.0.4-beta](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.0.4-beta) (2019-05-10)

[Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.0.3-beta...v0.0.4-beta)
Expand All @@ -140,40 +100,23 @@
- Add filter for restricted\_cap in models [\#51](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/51)
- Add name to ProductVariation [\#41](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/41)
- Cart type and queries [\#12](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/12)
- Adds "\*\_restricted\_cap" filters [\#53](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/53) ([kidunot89](https://github.com/kidunot89))
- ProductAttribute completion [\#50](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/50) ([kidunot89](https://github.com/kidunot89))

**Fixed:**

- Query products by categories returns an empty array. [\#44](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/44)
- More ProductVariation fields [\#49](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/49) ([kidunot89](https://github.com/kidunot89))
- Bugfix/\#44 [\#45](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/45) ([kidunot89](https://github.com/kidunot89))

**Merged pull requests:**

- to v0.0.3 [\#43](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/43) ([kidunot89](https://github.com/kidunot89))

## [v0.0.3-beta](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.0.3-beta) (2019-04-25)

[Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.0.2-beta...v0.0.3-beta)

**Enhancements:**

- Cart-type and queries and customer query [\#30](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/30) ([kidunot89](https://github.com/kidunot89))

**Fixed:**

- Pagination broken [\#29](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/29)
- Pagination fix for CPT-backed CRUD objects connections [\#36](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/36) ([kidunot89](https://github.com/kidunot89))

**Closed issues:**

- Unsetting "object\_ids" on all connections [\#39](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/39)

**Merged pull requests:**

- Master [\#35](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/35) ([kidunot89](https://github.com/kidunot89))

## [v0.0.2-beta](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.0.2-beta) (2019-04-22)

[Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/0db77c26ab463e6203df99eed2679f79ce3e4d60...v0.0.2-beta)
Expand All @@ -182,22 +125,10 @@

- TaxClass type [\#27](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/27)
- Order-Item type queries [\#13](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/13)
- Order items, TaxRate, and ShippingMethod [\#28](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/28) ([kidunot89](https://github.com/kidunot89))
- Where args for Coupon, Order, and Refund connections [\#24](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/24) ([kidunot89](https://github.com/kidunot89))
- Testing and CI renovation [\#21](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/21) ([kidunot89](https://github.com/kidunot89))
- WPGraphQL v0.3.0 migration [\#9](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/9) ([kidunot89](https://github.com/kidunot89))

**Fixed:**

- no queries work [\#31](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/31)
- after\_success script added [\#32](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/32) ([kidunot89](https://github.com/kidunot89))
- Polishing Product types and connections [\#22](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/22) ([kidunot89](https://github.com/kidunot89))

**Merged pull requests:**

- Formatting code to WordPress Coding Standards [\#8](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/8) ([kidunot89](https://github.com/kidunot89))
- Feature/Product type [\#7](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/7) ([kidunot89](https://github.com/kidunot89))
- Feature/coupon type [\#6](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/6) ([kidunot89](https://github.com/kidunot89))



Expand Down
20 changes: 15 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,27 @@ LABEL author_uri=https://github.com/kidunot89

SHELL [ "/bin/bash", "-c" ]

# Redeclare ARGs and set as environmental variables for reuse.
ARG DESIRED_WP_VERSION
ARG DESIRED_PHP_VERSION
ENV WP_VERSION=${DESIRED_WP_VERSION}
ENV PHP_VERSION=${DESIRED_PHP_VERSION}

# Install php extensions
RUN docker-php-ext-install pdo_mysql

# Install Xdebug
RUN if [ "$DESIRED_PHP_VERSION" == "5.6" ]; then yes | pecl install xdebug-2.5.5; else yes | pecl install xdebug; fi \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_autostart=off" >> /usr/local/etc/php/conf.d/xdebug.ini
# Install PCOV and XDebug
RUN if [ "$PHP_VERSION" != "5.6" ] && [ "$PHP_VERSION" != "7.0" ]; then \
apt-get install zip unzip -y && \
pecl install pcov && \
docker-php-ext-enable pcov && \
rm -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
echo "pcov.enabled=1" >> /usr/local/etc/php/php.ini ;\
elif [ "$PHP_VERSION" == "5.6" ]; then \
yes | pecl install xdebug-2.5.5; \
else \
yes | pecl install xdebug; \
fi

# Install composer
ENV COMPOSER_ALLOW_SUPERUSER=1
Expand Down
22 changes: 6 additions & 16 deletions bin/install-wp-tests.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,17 @@ if [[ -z "$TEST_DB_USER" ]]; then
else
DB_USER=$TEST_DB_USER
fi
if [[ -z "$TEST_DB_PASSWORD" ]]; then
DB_PASS=""
else
DB_PASS=$TEST_DB_PASSWORD
fi
if [[ -z "$TEST_DB_HOST" ]]; then
DB_HOST=localhost
else
DB_HOST=$TEST_DB_HOST
fi
if [ -z "$SKIP_DB_CREATE" ]; then
SKIP_DB_CREATE=false
fi

DB_HOST=${TEST_DB_HOST-localhost}
DB_PASS=${TEST_DB_PASSWORD-""}
WP_VERSION=${WP_VERSION-latest}
TMPDIR=${TMPDIR-/tmp}
TMPDIR=$(echo $TMPDIR | sed -e "s/\/$//")
WP_TESTS_DIR=${WP_TESTS_DIR-$TMPDIR/wordpress-tests-lib}
WP_CORE_DIR=${WP_CORE_DIR-$TMPDIR/wordpress/}
WP_CORE_DIR=${TEST_WP_ROOT_FOLDER-$TMPDIR/wordpress/}
PLUGIN_DIR=$(pwd)
DB_SERVE_NAME=${DB_SERVE_NAME-woographql_serve}
SKIP_DB_CREATE=${SKIP_DB_CREATE-false}

download() {
if [ `which curl` ]; then
Expand Down Expand Up @@ -193,14 +183,14 @@ setup_woocommerce() {
setup_wpgraphql() {
if [ ! -d $WP_CORE_DIR/wp-content/plugins/wp-graphql ]; then
echo "Cloning WPGraphQL"
wp plugin install https://github.com/wp-graphql/wp-graphql/archive/master.zip
wp plugin install https://github.com/wp-graphql/wp-graphql/archive/${CORE_BRANCH-master}.zip
fi
echo "Activating WPGraphQL"
wp plugin activate wp-graphql

if [ ! -d $WP_CORE_DIR/wp-content/plugins/wp-graphql-jwt-authentication ]; then
echo "Cloning WPGraphQL-JWT-Authentication"
wp plugin install https://github.com/wp-graphql/wp-graphql-jwt-authentication/archive/master.zip
wp plugin install https://github.com/wp-graphql/wp-graphql-jwt-authentication/archive/${JWT_AUTH_BRANCH-master}.zip
fi
echo "Activating WPGraphQL-JWT-Authentication"
wp plugin activate wp-graphql-jwt-authentication
Expand Down

0 comments on commit 5dcc41e

Please sign in to comment.