-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests: Drop Travis matrix in favor or stages
- Loading branch information
1 parent
a55eccc
commit 26039fe
Showing
2 changed files
with
52 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env bash | ||
|
||
cd "$(dirname "$0")/../" | ||
|
||
export PATH="$HOME/.composer/vendor/bin:$PATH" | ||
bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION | ||
source bin/install-php-phpunit.sh | ||
# Run the build because otherwise there will be a bunch of warnings about | ||
# failed `stat` calls from `filemtime()`. | ||
npm install || exit 1 | ||
npm run build || exit 1 | ||
# Make sure phpegjs parser is up to date | ||
node bin/create-php-parser.js || exit 1 | ||
if ! git diff --quiet --exit-code lib/parser.php; then | ||
echo 'ERROR: The PEG parser has been updated, but the generated PHP version' | ||
echo ' (lib/parser.php) has not. Run `bin/create-php-parser.js` and' | ||
echo ' commit the resulting changes to resolve this.' | ||
sleep .2 # Otherwise Travis doesn't want to print the whole message | ||
exit 1 | ||
fi | ||
echo Running with the following versions: | ||
php -v | ||
phpunit --version | ||
# Check parser syntax | ||
php lib/parser.php || exit 1 | ||
# Run PHPUnit tests | ||
phpunit || exit 1 | ||
WP_MULTISITE=1 phpunit || exit 1 |