Skip to content

Commit 987d268

Browse files
committed
update tests for github actions — wip
1 parent d3d04dc commit 987d268

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
ALT_DB_NAME: tr_v51_alt
8080

8181
- name: Verify WordPress database
82-
run: vendor/typerocket/core/wp-cli.phar db check --allow-root --path=wordpress
82+
run: ./wp-cli.phar db check --allow-root --path=wordpress
8383
env:
8484
HTTP_HOST: 127.0.0.1
8585

bin/setup-github-actions.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,18 @@ DB_HOST="${DB_HOST:-127.0.0.1}"
1111

1212
cd "$ROOT_PATH"
1313

14-
php galaxy root:install "$DB_NAME" "$DB_USER" "$DB_PASSWORD"
14+
if [ ! -f wp-cli.phar ]; then
15+
curl -fsSL -o wp-cli.phar https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
16+
fi
1517

16-
php galaxy config:seed
18+
chmod +x wp-cli.phar
19+
20+
php galaxy root:install "$DB_NAME" "$DB_USER" "$DB_PASSWORD"
1721

1822
sed -i "s/define( 'DB_HOST', '.*' );/define( 'DB_HOST', '$DB_HOST' );/" wp-config.php
23+
grep "DB_HOST" wp-config.php
24+
25+
php galaxy config:seed
1926

2027
if ! grep -q "TYPEROCKET_ALT_DATABASE_DATABASE" wp-config.php; then
2128
sed -i "/\/\* That's all, stop editing! Happy publishing\. \*\//i\\

0 commit comments

Comments
 (0)