Skip to content

Commit e1a5230

Browse files
authored
Merge pull request #327 from wp-graphql/release/v0.6.0
Release v0.6.0
2 parents 2553be0 + 86a7ef1 commit e1a5230

File tree

108 files changed

+3874
-2759
lines changed

Some content is hidden

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

108 files changed

+3874
-2759
lines changed

.env.dist

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,4 @@ CORE_BRANCH=develop
3030
JWT_AUTH_BRANCH=develop
3131
STRIPE_GATEWAY=1
3232
GRAPHQL_JWT_AUTH_SECRET_KEY=testingtesting123
33-
STRIPE_API_PUBLISHABLE_KEY=test_key
34-
STRIPE_API_SECRET_KEY=test_secret
33+
SKIP_TESTS_CLEANUP=1
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: build_release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
build_release:
10+
name: "Build Release"
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v1
15+
16+
- name: Setup PHP
17+
uses: shivammathur/setup-php@v2
18+
with:
19+
php-version: 7.3
20+
extensions: mbstring, intl
21+
tools: composer
22+
23+
- name: Install dependencies
24+
run: composer install --no-dev
25+
26+
- name: List files
27+
run: ls -laR
28+
29+
- name: Generate draft release
30+
uses: meeDamian/[email protected]
31+
with:
32+
token: "${{ secrets.GITHUB_TOKEN }}"
33+
prerelease: true
34+
draft: true
35+
title: "Release {{ github.ref }}"
36+
gzip: true
37+
files: >
38+
includes/
39+
vendor/
40+
.distignore
41+
access-functions.php
42+
CHANGELOG.md
43+
class-inflect.php
44+
LICENSE
45+
logo.svg
46+
README.md
47+
README.txt
48+
SECURITY.md
49+
wp-graphql-woocommerce.php

.github/workflows/testing-integration.yml renamed to .github/workflows/continous-integration.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Testing Integration
1+
name: continuous_integration
22

33
on:
44
schedule:
@@ -7,15 +7,17 @@ on:
77
branches:
88
- develop
99
- master
10+
- release/v0.6.0
1011
pull_request:
1112
branches:
1213
- develop
14+
- release/v0.6.0
1315
paths:
1416
- '**.php'
1517
- '!docs/**'
1618

1719
jobs:
18-
run:
20+
continuous_integration:
1921
env:
2022
STRIPE_API_PUBLISHABLE_KEY: ${{ secrets.STRIPE_API_PUBLISHABLE_KEY }}
2123
STRIPE_API_SECRET_KEY: ${{ secrets.STRIPE_API_SECRET_KEY }}
@@ -47,6 +49,20 @@ jobs:
4749
php-version: ${{ matrix.php }}
4850
extensions: json, mbstring
4951

52+
- name: Get Composer Cache Directory
53+
id: composercache
54+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
55+
56+
- name: Cache dependencies
57+
uses: actions/cache@v2
58+
with:
59+
path: ${{ steps.composercache.outputs.dir }}
60+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
61+
restore-keys: ${{ runner.os }}-composer-
62+
63+
- name: Install dependencies
64+
run: composer install --no-dev
65+
5066
- name: Build "testing" Docker Image
5167
env:
5268
PHP_VERSION: ${{ matrix.php }}
Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
1-
name: WordPress Coding Standards
1+
name: lint_code
22

33
on:
44
push:
55
branches:
66
- develop
77
- master
8+
- release/v0.6.0
89
pull_request:
910
branches:
1011
- develop
12+
- release/v0.6.0
1113
paths:
1214
- '**.php'
1315
- '!docs/**'
1416

1517
jobs:
16-
run:
18+
lint_code:
1719
runs-on: ubuntu-latest
20+
name: "Lint code with PHPCS"
1821
steps:
1922
- name: Checkout
2023
uses: actions/checkout@v1
2124

2225
- name: Setup PHP
23-
uses: shivammathur/setup-php@v1
26+
uses: shivammathur/setup-php@v2
2427
with:
2528
php-version: 7.3
2629
extensions: mbstring, intl
@@ -32,11 +35,7 @@ jobs:
3235

3336
- name: Install dependencies
3437
run: |
35-
composer require \
36-
squizlabs/php_codesniffer \
37-
phpcompatibility/phpcompatibility-wp wp-coding-standards/wpcs \
38-
dealerdirect/phpcodesniffer-composer-installer
39-
composer install --no-dev
38+
composer install
4039
4140
- name: Cache dependencies
4241
uses: actions/cache@v1
@@ -46,4 +45,4 @@ jobs:
4645
restore-keys: ${{ runner.os }}-composer
4746

4847
- name: Run PHP CodeSniffer
49-
run: vendor/bin/phpcs
48+
run: composer lint

.phpcs.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0"?>
22
<ruleset name="WordPress Coding Standards based custom ruleset for your plugin">
3+
<config name="installed_paths" value="vendor/wp-coding-standards/wpcs" />
34
<description>Generally-applicable sniffs for WordPress plugins.</description>
45

56
<!-- What to scan -->
@@ -19,15 +20,16 @@
1920
<arg name="colors"/>
2021
<arg name="extensions" value="php"/>
2122
<arg name="parallel" value="8"/><!-- Enables parallel processing when available for faster results. -->
22-
2323
<!-- Rules: Check PHP version compatibility -->
2424
<!-- https://github.com/PHPCompatibility/PHPCompatibility#sniffing-your-code-for-compatibility-with-specific-php-versions -->
2525
<config name="testVersion" value="7.0-"/>
26-
<!-- https://github.com/PHPCompatibility/PHPCompatibilityWP -->
27-
<rule ref="PHPCompatibilityWP"/>
2826

2927
<!-- Rules: WordPress Coding Standards -->
3028
<!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards -->
29+
<rule ref="WordPress-Core" />
30+
<rule ref="WordPress-Docs" />
31+
<rule ref="WordPress-Extra" />
32+
3133
<!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties -->
3234
<config name="minimum_supported_wp_version" value="4.9"/>
3335
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
2. Install & activate [WPGraphQL](https://www.wpgraphql.com/)
1212
3. Clone or download the zip of this repository into your WordPress plugin directory & activate the **WP GraphQL WooCommerce** plugin.
1313
4. (Optional) Install & activate [WPGraphQL-JWT-Authentication](https://github.com/wp-graphql/wp-graphql-jwt-authentication) to add a `login` mutation that returns a JSON Web Token.
14-
5. (Optional) Install & activate [WPGraphQL-CORS](https://github.com/funkhaus/wp-graphql-cors) to add an extra layer of security using HTTP CORS and some of WPGraphQL advanced functionality.
14+
5. (Optional) Install & activate [WPGraphQL-CORS](https://github.com/funkhaus/wp-graphql-cors) to add an extra layer of security using HTTP CORS and some of WPGraphQL advanced functionality.
1515

1616
## What does this plugin do?
1717
It adds WooCommerce functionality to the WPGraphQL schema using WooCommerce's [CRUD](https://github.com/woocommerce/woocommerce/wiki/CRUD-Objects-in-3.0) objects.
@@ -37,6 +37,10 @@ Feel free to test out the extension using this [GraphiQL Playground](https://woo
3737

3838
## Follow [![alt text](http://i.imgur.com/tXSoThF.png)](https://twitter.com/woographql)[![alt text](http://i.imgur.com/P3YfQoD.png)](https://www.facebook.com/woographql)
3939

40+
## Demo/Examples
41+
42+
## Who using WooGraphQL
43+
4044
## Contributors
4145

4246
### Code Contributors

README.txt

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
=== WP GraphQL WooCommerce ===
2-
Contributors: kidunot89, ranaaterning, jasonbahl, saleebm
3-
Tags: GraphQL, WooCommerce, WPGraphQL
4-
Requires at least: 4.9
5-
Tested up to: 5.2
6-
Requires PHP: 7.0
7-
Requires WooCommerce: 3.0.0
8-
Requires WPGraphQL: 0.8.0+
9-
Works with WPGraphQL-JWT-Authentication: 0.4.0+
10-
Stable tag: 0.5.1
11-
License: GPL-3
12-
License URI: https://www.gnu.org/licenses/gpl-3.0.html
13-
Maintained at: https://github.com/wp-graphql/wp-graphql-woocommerce
14-
15-
== Description ==
16-
Adds WooCommerce functionality to the WPGraphQL schema.
1+
=== WP GraphQL WooCommerce ===
2+
Contributors: kidunot89, ranaaterning, jasonbahl, saleebm
3+
Tags: GraphQL, WooCommerce, WPGraphQL
4+
Requires at least: 4.9
5+
Tested up to: 5.2
6+
Requires PHP: 7.0
7+
Requires WooCommerce: 4.7.0
8+
Requires WPGraphQL: 0.13.4+
9+
Works with WPGraphQL-JWT-Authentication: 0.4.0+
10+
Stable tag: 0.6.0
11+
License: GPL-3
12+
License URI: https://www.gnu.org/licenses/gpl-3.0.html
13+
Maintained at: https://github.com/wp-graphql/wp-graphql-woocommerce
14+
15+
== Description ==
16+
Adds WooCommerce functionality to the WPGraphQL schema.

bin/run-docker.sh

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
set -eu
44

5+
print_usage_instructions() {
6+
echo "Usage: $0 build|run [-e=env-file ] [-a|-t]";
7+
exit 1
8+
}
9+
10+
if [ -z "$1" ]; then
11+
print_usage_instructions
12+
fi
13+
14+
env_file=".env.dist";
15+
516
subcommand=$1; shift
617
case "$subcommand" in
718
"build" )
@@ -20,23 +31,30 @@ case "$subcommand" in
2031
--build-arg WP_VERSION=${WP_VERSION-5.4} \
2132
--build-arg PHP_VERSION=${PHP_VERSION-7.4} \
2233
.
23-
34+
2435
docker build -f docker/testing.Dockerfile \
2536
-t woographql-testing:latest \
2637
--build-arg USE_XDEBUG=${USE_XDEBUG-} \
2738
.
2839
;;
29-
\? ) echo "Usage: $0 build [-a|-t]";;
30-
* ) echo "Usage: $0 build [-a|-t]";;
40+
\? ) print_usage_instructions;;
41+
* ) print_usage_instructions;;
3142
esac
3243
done
3344
shift $((OPTIND -1))
3445
;;
3546
"run" )
36-
while getopts ":a:t" opt; do
47+
while getopts "e:at" opt; do
3748
case ${opt} in
38-
a ) docker-compose up -d --scale testing=0 --build;;
49+
e )
50+
env_file=${OPTARG};
51+
if [ ! -f $env_file ]; then
52+
echo "No file found at $env_file"
53+
fi
54+
;;
55+
a ) docker-compose up --scale testing=0;;
3956
t )
57+
source ${env_file}
4058
docker-compose run --rm \
4159
-e STRIPE_API_PUBLISHABLE_KEY=${STRIPE_API_PUBLISHABLE_KEY-} \
4260
-e STRIPE_API_SECRET_KEY=${STRIPE_API_SECRET_KEY-} \
@@ -46,13 +64,13 @@ case "$subcommand" in
4664
-e SKIP_TESTS_CLEANUP=${SKIP_TESTS_CLEANUP-} \
4765
testing --scale app=0
4866
;;
49-
\? ) echo "Usage: $0 run [-a|-t]";;
50-
* ) echo "Usage: $0 run [-a|-t]";;
67+
\? ) print_usage_instructions;;
68+
* ) print_usage_instructions;;
5169
esac
5270
done
5371
shift $((OPTIND -1))
5472
;;
5573

56-
\? ) echo "Usage: $0 <build|run> [-a|-t]";;
57-
* ) echo "Usage: $0 <build|run> [-a|-t]";;
74+
\? ) print_usage_instructions;;
75+
* ) print_usage_instructions;;
5876
esac

0 commit comments

Comments
 (0)