Skip to content

Commit 9704f8d

Browse files
committed
Merge branch 'release/v0.5.1' into develop
2 parents 25c584c + 6ac72bc commit 9704f8d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+2176
-440
lines changed

.env.dist

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,7 @@ TESTS_ENVS=tests/_envs
2828

2929
CORE_BRANCH=develop
3030
JWT_AUTH_BRANCH=develop
31-
SKIP_TEST_CLEANUP=0
31+
STRIPE_GATEWAY=1
32+
GRAPHQL_JWT_AUTH_SECRET_KEY=testingtesting123
33+
STRIPE_API_PUBLISHABLE_KEY=test_key
34+
STRIPE_API_SECRET_KEY=test_secret
File renamed without changes.
File renamed without changes.

.github/workflows/testing-integration.yml

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,59 +10,57 @@ on:
1010
pull_request:
1111
branches:
1212
- develop
13+
- release/v0.5.1
1314

1415
jobs:
1516
run:
1617
runs-on: ubuntu-latest
17-
env:
18-
coverage: 0
19-
debug: 0
2018
strategy:
2119
matrix:
22-
php: ['7.3', '7.2', '7.1', '7.0']
23-
wordpress: ['5.3', '5.0', '4.9']
20+
php: ['7.3', '7.2', '7.1']
21+
wordpress: ['5.3', '5.0']
2422
include:
25-
- php: '7.0'
23+
- php: '7.1'
2624
use_xdebug: 1
27-
- php: '7.0'
25+
- php: '7.1'
2826
wordpress: '5.0'
2927
coverage: 1
30-
31-
exclude:
3228
- php: '7.3'
33-
wordpress: '4.9'
34-
- php: '7.2'
35-
wordpress: '4.9'
36-
- php: '7.0'
37-
wordpress: '5.3'
29+
wordpress: '5.0'
30+
debug: 1
31+
3832
fail-fast: false
3933
name: WordPress ${{ matrix.wordpress }} on PHP ${{ matrix.php }}
4034
steps:
4135
- name: Checkout
42-
uses: actions/checkout@v1
36+
uses: actions/checkout@v2
37+
38+
- name: Install PHP
39+
if: matrix.coverage == 1
40+
uses: shivammathur/setup-php@v2
41+
with:
42+
php-version: ${{ matrix.php }}
43+
extensions: json, mbstring
4344

4445
- name: Build "testing" Docker Image
45-
run: |
46-
docker-compose build \
47-
--build-arg PHP_VERSION=${{ matrix.php }} \
48-
--build-arg WP_VERSION=${{ matrix.wordpress }} \
49-
--build-arg USE_XDEBUG=${{ matrix.use_xdebug }} \
50-
testing
46+
env:
47+
PHP_VERSION: ${{ matrix.php }}
48+
WP_VERSION: ${{ matrix.wordpress }}
49+
USE_XDEBUG: ${{ matrix.use_xdebug }}
50+
run: bin/run-docker.sh build -t
5151

5252
- name: Run Tests w/ Docker.
53-
run: |
54-
docker-compose run --rm \
55-
-e COVERAGE=${{ matrix.coverage }} \
56-
-e DEBUG=${{ matrix.debug }} \
57-
testing --scale app=0
53+
env:
54+
STRIPE_API_PUBLISHABLE_KEY: ${{ secrets.STRIPE_API_PUBLISHABLE_KEY }}
55+
STRIPE_API_SECRET_KEY: ${{ secrets.STRIPE_API_SECRET_KEY }}
56+
COVERAGE: ${{ matrix.coverage }}
57+
DEBUG: ${{ matrix.debug }}
58+
SKIP_TESTS_CLEANUP: ${{ matrix.coverage }}
59+
run: bin/run-docker.sh run -t
5860

5961
- name: Push Codecoverage to Coveralls.io
6062
if: matrix.coverage == 1
6163
env:
6264
COVERALLS_RUN_LOCALLY: 1
63-
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
64-
run: |
65-
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar
66-
chmod +x php-coveralls.phar
67-
68-
php php-coveralls.phar -v
65+
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
run: vendor/bin/php-coveralls -v

.github/workflows/wordpress-coding-standards.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
pull_request:
99
branches:
1010
- develop
11+
- release/v0.5.1
1112

1213
jobs:
1314
run:

README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Requires PHP: 7.0
77
Requires WooCommerce: 3.0.0
88
Requires WPGraphQL: 0.8.0+
99
Works with WPGraphQL-JWT-Authentication: 0.4.0+
10-
Stable tag: 0.4.4
10+
Stable tag: 0.5.1
1111
License: GPL-3
1212
License URI: https://www.gnu.org/licenses/gpl-3.0.html
1313
Maintained at: https://github.com/wp-graphql/wp-graphql-woocommerce

bin/install-test-env.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ configure_wordpress() {
149149
setup_woocommerce() {
150150
echo "Installing & Activating WooCommerce"
151151
wp plugin install woocommerce --activate
152+
echo "Installing & Activating WooCommerce-Gateway-Stripe"
153+
wp plugin install woocommerce-gateway-stripe --activate
152154
}
153155

154156
setup_wpgraphql() {

bin/run-docker.sh

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#!/usr/bin/env bash
2+
3+
set -eu
4+
5+
subcommand=$1; shift
6+
case "$subcommand" in
7+
"build" )
8+
while getopts ":at" opt; do
9+
case ${opt} in
10+
a )
11+
docker build -f docker/app.Dockerfile \
12+
-t woographql-app:latest \
13+
--build-arg WP_VERSION=${WP_VERSION-5.4} \
14+
--build-arg PHP_VERSION=${PHP_VERSION-7.4} \
15+
.
16+
;;
17+
t )
18+
docker build -f docker/app.Dockerfile \
19+
-t woographql-app:latest \
20+
--build-arg WP_VERSION=${WP_VERSION-5.4} \
21+
--build-arg PHP_VERSION=${PHP_VERSION-7.4} \
22+
.
23+
24+
docker build -f docker/testing.Dockerfile \
25+
-t woographql-testing:latest \
26+
--build-arg USE_XDEBUG=${USE_XDEBUG-} \
27+
.
28+
;;
29+
\? ) echo "Usage: $0 build [-a|-t]";;
30+
* ) echo "Usage: $0 build [-a|-t]";;
31+
esac
32+
done
33+
shift $((OPTIND -1))
34+
;;
35+
"run" )
36+
while getopts ":a:t" opt; do
37+
case ${opt} in
38+
a ) docker-compose up -d --scale testing=0 --build;;
39+
t )
40+
docker-compose run --rm \
41+
-e STRIPE_API_PUBLISHABLE_KEY=${STRIPE_API_PUBLISHABLE_KEY-} \
42+
-e STRIPE_API_SECRET_KEY=${STRIPE_API_SECRET_KEY-} \
43+
-e SUITES=${SUITES-} \
44+
-e COVERAGE=${COVERAGE-} \
45+
-e DEBUG=${DEBUG-} \
46+
-e SKIP_TESTS_CLEANUP=${SKIP_TESTS_CLEANUP-} \
47+
testing --scale app=0
48+
;;
49+
\? ) echo "Usage: $0 run [-a|-t]";;
50+
* ) echo "Usage: $0 run [-a|-t]";;
51+
esac
52+
done
53+
shift $((OPTIND -1))
54+
;;
55+
56+
\? ) echo "Usage: $0 <build|run> [-a|-t]";;
57+
* ) echo "Usage: $0 <build|run> [-a|-t]";;
58+
esac

codeception.dist.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,16 @@ modules:
7272
tablePrefix: '%WP_TABLE_PREFIX%'
7373
domain: '%WP_DOMAIN%'
7474
adminEmail: '%ADMIN_EMAIL%'
75-
title: 'Test'
76-
plugins:
75+
title: 'Test'
76+
plugins:
7777
- woocommerce/woocommerce.php
78+
- woocommerce-gateway-stripe/woocommerce-gateway-stripe.php
7879
- wp-graphql/wp-graphql.php
7980
- wp-graphql-jwt-authentication/wp-graphql-jwt-authentication.php
8081
- wp-graphql-woocommerce/wp-graphql-woocommerce.php
8182
activatePlugins:
8283
- woocommerce/woocommerce.php
84+
- woocommerce-gateway-stripe/woocommerce-gateway-stripe.php
8385
- wp-graphql/wp-graphql.php
8486
- wp-graphql-jwt-authentication/wp-graphql-jwt-authentication.php
8587
- wp-graphql-woocommerce/wp-graphql-woocommerce.php

composer.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,19 @@
2525
"firebase/php-jwt": "^5.0"
2626
},
2727
"require-dev": {
28-
"lucatume/wp-browser": ">=2.2.1 <2.2.8"
28+
"lucatume/wp-browser": ">=2.2.1 <2.2.8",
29+
"simpod/php-coveralls-mirror": "^3.0",
30+
"stripe/stripe-php": "^7.28"
2931
},
3032
"config": {
3133
"optimize-autoloader": true
3234
},
3335
"autoload": {
36+
<<<<<<< HEAD
3437
"files":[
38+
=======
39+
"files": [
40+
>>>>>>> release/v0.5.1
3541
"includes/connection/wc-cpt-connection-args.php",
3642
"includes/functions.php"
3743
],
@@ -42,6 +48,11 @@
4248
"includes/"
4349
]
4450
},
51+
"autoload-dev": {
52+
"files": [
53+
"tests/_data/config.php"
54+
]
55+
},
4556
"scripts": {
4657
"install-test-env": "bash bin/install-test-env.sh",
4758
"test": "vendor/bin/codecept run",

0 commit comments

Comments
 (0)