Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/wp-phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
##- main
pull_request:
branches:
##- develop
- develop
- master
##- main

Expand Down
11 changes: 11 additions & 0 deletions bin/install-wp-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,17 @@ install_db() {
mysqladmin create $DB_NAME --user="$DB_USER" --password="$DB_PASS"$EXTRA
}

install_gu() {
if [ -d "${WP_CORE_DIR}wp-content/plugins/git-updater" ]; then
return;
fi

local LATEST_GU_ZIP=$(curl -s https://api.github.com/repos/afragen/git-updater/releases/latest | grep browser_download_url | cut -d '"' -f 4)
curl -L $LATEST_GU_ZIP > ${WP_CORE_DIR}wp-content/plugins/git-updater.zip
unzip -q ${WP_CORE_DIR}wp-content/plugins/git-updater.zip -d ${WP_CORE_DIR}wp-content/plugins
}

install_wp
install_test_suite
install_db
install_gu
9 changes: 9 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@
// Give access to tests_add_filter() function.
require_once $_tests_dir . '/includes/functions.php';

/**
* Manually load dependencies.
*/
function _manually_load_dependencies() {
echo 'Loading Git Updater...' . PHP_EOL;
require WP_PLUGIN_DIR . '/git-updater/git-updater.php';
}
tests_add_filter( 'muplugins_loaded', '_manually_load_dependencies' );

/**
* Manually load the plugin being tested.
*/
Expand Down