diff --git a/bin/install-wp-tests.sh b/bin/install-wp-tests.sh index c6f53dc5..c6417b0d 100755 --- a/bin/install-wp-tests.sh +++ b/bin/install-wp-tests.sh @@ -176,6 +176,11 @@ install_db() { fi } +install_gp() { + git clone --branch develop --single-branch -q https://github.com/GlotPress/GlotPress.git "$WP_CORE_DIR/wp-content/plugins/glotpress" +} + install_wp install_test_suite install_db +install_gp diff --git a/tests/bootstrap.php b/tests/bootstrap.php index d3d057d2..d0f8150c 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -6,7 +6,11 @@ } function _glotpress_path( string $path ): string { - return dirname( __DIR__, 2 ) . '/glotpress/' . $path; + $glotpress_path = dirname( __DIR__, 2 ) . '/glotpress/'; + if ( getenv( 'GITHUB_ACTIONS' ) ) { + $glotpress_path = '/tmp/wordpress/wp-content/plugins/glotpress/'; + } + return $glotpress_path . $path; } // Forward custom PHPUnit Polyfills configuration to PHPUnit bootstrap file.