Skip to content

Commit 00501ab

Browse files
committed
Added missing install plugins script.
1 parent bbbc9e4 commit 00501ab

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

.github/actions/codeception/action.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,21 @@ runs:
6161
fi
6262
env:
6363
WP_VERSION: ${{ inputs.wordpress }}
64-
PHP_VERSION: ${{ inputs.php }}
64+
PHP_VERSION: ${{ inputs.php }}
65+
66+
- name: Run Acceptance Tests w/ Docker
67+
working-directory: ${{ inputs.working-directory }}
68+
shell: bash
69+
run: |
70+
if [ "${{ inputs.extensions }}" = "true" ]; then
71+
docker exec \
72+
--env DEBUG=${{ env.DEBUG }} \
73+
--env SKIP_TESTS_CLEANUP=${{ env.SKIP_TESTS_CLEANUP }} \
74+
--env SUITES=acceptance \
75+
$(docker compose ps -q wordpress) \
76+
bash -c "cd wp-content/plugins/$(basename ${{ inputs.working-directory }}) && bin/run-codeception.sh"
77+
fi
78+
env:
79+
DEBUG: ${{ env.ACTIONS_STEP_DEBUG }}
80+
SKIP_TESTS_CLEANUP: 'true'
81+
continue-on-error: true
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
# Exit if any command fails.
4+
set -e
5+
6+
source ".env"
7+
8+
# WPGraphQL
9+
install_wpgraphql() {
10+
if ! $( wp plugin is-installed wp-graphql --allow-root ); then
11+
wp plugin install wp-graphql --allow-root
12+
fi
13+
wp plugin activate wp-graphql --allow-root
14+
}
15+
16+
# Run the install functions.
17+
cd $WORDPRESS_ROOT_DIR
18+
19+
install_wpgraphql

0 commit comments

Comments
 (0)