Skip to content

Commit

Permalink
Clone GlotPress in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
psrpinto committed Feb 21, 2024
1 parent 49af368 commit 27c3c04
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions bin/install-wp-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 27c3c04

Please sign in to comment.