This repository was archived by the owner on Jul 23, 2024. It is now read-only.
File tree 12 files changed +51
-49
lines changed
12 files changed +51
-49
lines changed Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ ADMIN_PATH=/wp-admin
12
12
13
13
TEST_DB_NAME=wpgraphql_acf_tests
14
14
TEST_DB_HOST=127.0.0.1
15
- TEST_DB_USER=wordpress
16
- TEST_DB_PASSWORD=wordpress
15
+ TEST_DB_USER=root
16
+ TEST_DB_PASSWORD=root
17
17
TEST_WP_TABLE_PREFIX=wp_
18
18
19
19
SKIP_DB_CREATE=false
Original file line number Diff line number Diff line change 1
- name : Schema Artifact
1
+ name : Upload Schema Artifact
2
2
3
3
on :
4
- workflow_dispatch :
5
- push :
6
- branches :
7
- - develop
8
- - master
9
- pull_request :
10
- branches :
11
- - develop
12
- - master
4
+ release :
5
+ types : [ published ]
13
6
14
7
jobs :
15
8
run :
@@ -42,21 +35,18 @@ jobs:
42
35
43
36
- name : Install WP CLI for ACF
44
37
run : |
45
- cd /tmp/wordpress/
46
- wp plugin install https://github.com/hoppinger/advanced-custom-fields-wpcli/archive/refs/heads/master.zip --activate
38
+ wp plugin install https://github.com/hoppinger/advanced-custom-fields-wpcli/archive/refs/heads/master.zip --activate --path="/tmp/wordpress"
47
39
- name : Import test Field Group
48
40
run : |
49
- echo ${GITHUB_WORKSPACE}/docs/field-group-examples-export.json
50
- wp acf import --json_file="${GITHUB_WORKSPACE}/docs/field-group-examples-export.json"
41
+ wp acf import --json_file="${GITHUB_WORKSPACE}/docs/field-group-examples-export.json" --path="/tmp/wordpress"
51
42
- name : Generate the Static Schema
52
43
run : |
53
44
cd /tmp/wordpress/
54
45
# Output: /tmp/schema.graphql
55
46
wp graphql generate-static-schema
56
- echo "$(</tmp/schema.graphql )"
57
- # - name: Upload schema as release artifact
58
- # uses: softprops/action-gh-release@v1
59
- # with:
60
- # files: /tmp/schema.graphql
61
- # env:
62
- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47
+ - name : Upload schema as release artifact
48
+ uses : softprops/action-gh-release@v1
49
+ with :
50
+ files : /tmp/schema.graphql
51
+ env :
52
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -17,3 +17,6 @@ vendor/composer/installed.json
17
17
vendor /composer /* /
18
18
composer.lock
19
19
.log
20
+ local
21
+ wp-content
22
+
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
- if [[ ! -f " .env" ] ]; then
3
+ if [ ! -f .env ]; then
4
4
echo " No .env file was detected. .env.dist has been copied to .env"
5
5
echo " Open the .env file and enter values to match your local environment"
6
- cp .env.dist .env
6
+ cp ./.env.dist ./.env
7
+ export $( cat .env | xargs)
7
8
fi
8
9
9
- source .env.dist
10
-
11
- env | sort
10
+ source .env
12
11
13
12
print_usage_instruction () {
14
13
echo " Ensure that .env file exist in project root directory exists."
@@ -140,8 +139,6 @@ install_db() {
140
139
fi
141
140
fi
142
141
143
- env | sort
144
-
145
142
# create database
146
143
RESULT=` mysql -u $DB_USER --password=" $DB_PASS " --skip-column-names -e " SHOW DATABASES LIKE '$DB_NAME '" $EXTRA `
147
144
if [ " $RESULT " != $DB_NAME ]; then
Original file line number Diff line number Diff line change @@ -21,7 +21,17 @@ if [ -z "$1" ]; then
21
21
print_usage_instructions
22
22
fi
23
23
24
- BUILD_NO_CACHE=
24
+ TAG=${TAG-latest}
25
+ WP_VERSION=${WP_VERSION-5.6}
26
+ PHP_VERSION=${PHP_VERSION-7.4}
27
+
28
+ BUILD_NO_CACHE=${BUILD_NO_CACHE-}
29
+
30
+ if [[ ! -f " .env" ]]; then
31
+ echo " No .env file was detected. .env.dist has been copied to .env"
32
+ echo " Open the .env file and enter values to match your local environment"
33
+ cp .env.dist .env
34
+ fi
25
35
26
36
subcommand=$1 ; shift
27
37
case " $subcommand " in
Original file line number Diff line number Diff line change 45
45
"phpstan" : [" phpstan analyze --ansi --memory-limit=1G" ]
46
46
},
47
47
"require" : {
48
- "php" : " ^7"
48
+ "php" : " ^7.1 || ^8.0 "
49
49
},
50
50
"require-dev" : {
51
51
"lucatume/wp-browser" : " ^2.4" ,
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli
47
47
# Set project environmental variables
48
48
ENV WP_ROOT_FOLDER="/var/www/html"
49
49
ENV PLUGINS_DIR="${WP_ROOT_FOLDER}/wp-content/plugins"
50
- ENV PROJECT_DIR="${PLUGINS_DIR}/wp-graphql"
50
+ ENV PROJECT_DIR="${PLUGINS_DIR}/wp-graphql-acf "
51
51
ENV DATA_DUMP_DIR="${PROJECT_DIR}/tests/_data"
52
52
53
53
# Remove exec statement from base entrypoint script.
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
# Activate wp-graphql
4
- wp plugin activate wp-graphql --allow-root
4
+ wp plugin install https://github.com/wp-premium/advanced-custom-fields-pro/archive/refs/heads/master.zip --activate --allow-root
5
+ wp plugin install wp-graphql --allow-root --activate
6
+ wp plugin activate wp-graphql-acf --allow-root
5
7
6
8
# Set pretty permalinks.
7
9
wp rewrite structure ' /%year%/%monthnum%/%postname%/' --allow-root
Original file line number Diff line number Diff line change 5
5
ARG WP_VERSION
6
6
ARG PHP_VERSION
7
7
8
- FROM wp-graphql :latest-wp${WP_VERSION}-php${PHP_VERSION}
8
+ FROM wpgraphql-acf-app :latest
9
9
10
10
LABEL author=jasonbahl
11
11
LABEL author_uri=https://github.com/jasonbahl
Original file line number Diff line number Diff line change @@ -25,24 +25,24 @@ class InstalledVersions
25
25
private static $ installed = array (
26
26
'root ' =>
27
27
array (
28
- 'pretty_version ' => 'dev-master ' ,
29
- 'version ' => 'dev-master ' ,
28
+ 'pretty_version ' => 'dev-develop ' ,
29
+ 'version ' => 'dev-develop ' ,
30
30
'aliases ' =>
31
31
array (
32
32
),
33
- 'reference ' => 'dc5e83d190211baf88978a905ff44a9122fdaff8 ' ,
33
+ 'reference ' => 'f34bb96ba52af54541439299b04e2b95d4f7564a ' ,
34
34
'name ' => 'wp-graphql/wp-graphql-acf ' ,
35
35
),
36
36
'versions ' =>
37
37
array (
38
38
'wp-graphql/wp-graphql-acf ' =>
39
39
array (
40
- 'pretty_version ' => 'dev-master ' ,
41
- 'version ' => 'dev-master ' ,
40
+ 'pretty_version ' => 'dev-develop ' ,
41
+ 'version ' => 'dev-develop ' ,
42
42
'aliases ' =>
43
43
array (
44
44
),
45
- 'reference ' => 'dc5e83d190211baf88978a905ff44a9122fdaff8 ' ,
45
+ 'reference ' => 'f34bb96ba52af54541439299b04e2b95d4f7564a ' ,
46
46
),
47
47
),
48
48
);
Original file line number Diff line number Diff line change 1
1
<?php return array (
2
2
'root ' =>
3
3
array (
4
- 'pretty_version ' => 'dev-master ' ,
5
- 'version ' => 'dev-master ' ,
4
+ 'pretty_version ' => 'dev-develop ' ,
5
+ 'version ' => 'dev-develop ' ,
6
6
'aliases ' =>
7
7
array (
8
8
),
9
- 'reference ' => 'dc5e83d190211baf88978a905ff44a9122fdaff8 ' ,
9
+ 'reference ' => 'f34bb96ba52af54541439299b04e2b95d4f7564a ' ,
10
10
'name ' => 'wp-graphql/wp-graphql-acf ' ,
11
11
),
12
12
'versions ' =>
13
13
array (
14
14
'wp-graphql/wp-graphql-acf ' =>
15
15
array (
16
- 'pretty_version ' => 'dev-master ' ,
17
- 'version ' => 'dev-master ' ,
16
+ 'pretty_version ' => 'dev-develop ' ,
17
+ 'version ' => 'dev-develop ' ,
18
18
'aliases ' =>
19
19
array (
20
20
),
21
- 'reference ' => 'dc5e83d190211baf88978a905ff44a9122fdaff8 ' ,
21
+ 'reference ' => 'f34bb96ba52af54541439299b04e2b95d4f7564a ' ,
22
22
),
23
23
),
24
24
);
Original file line number Diff line number Diff line change 4
4
5
5
$ issues = array ();
6
6
7
- if (!(PHP_VERSION_ID >= 70000 )) {
8
- $ issues [] = 'Your Composer dependencies require a PHP version ">= 7.0 .0". You are running ' . PHP_VERSION . '. ' ;
7
+ if (!(PHP_VERSION_ID >= 70100 )) {
8
+ $ issues [] = 'Your Composer dependencies require a PHP version ">= 7.1 .0". You are running ' . PHP_VERSION . '. ' ;
9
9
}
10
10
11
11
if ($ issues ) {
You can’t perform that action at this time.
0 commit comments