Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dev-lib and use for dogfooding rulesets (WordPress-Core) in Travis CI builds #587

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "dev-lib"]
path = dev-lib
url = https://github.com/xwp/wp-dev-lib.git
branch = master
15 changes: 10 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,17 @@ matrix:
- php: hhvm
- env: PHPCS_BRANCH=3.0

before_script:
install:
- export DEV_LIB_PATH=dev-lib
- export DEV_LIB_SKIP=composer
- if [ ! -e "$DEV_LIB_PATH" ] && [ -L .travis.yml ]; then export DEV_LIB_PATH=$( dirname $( readlink .travis.yml ) ); fi
- if [ ! -e "$DEV_LIB_PATH" ]; then git clone https://github.com/xwp/wp-dev-lib.git $DEV_LIB_PATH; fi
- export PHPCS_DIR=/tmp/phpcs
- export PHPCS_BIN=$(if [[ $PHPCS_BRANCH == 3.0 ]]; then echo $PHPCS_DIR/bin/phpcs; else echo $PHPCS_DIR/scripts/phpcs; fi)
- mkdir -p $PHPCS_DIR && git clone --depth 1 https://github.com/squizlabs/PHP_CodeSniffer.git -b $PHPCS_BRANCH $PHPCS_DIR
- $PHPCS_BIN --config-set installed_paths $(pwd)
- export PHPCS_BIN_DIR=$(if [[ $PHPCS_BRANCH == 3.0 ]]; then echo $PHPCS_DIR/bin; else echo $PHPCS_DIR/scripts; fi)
- export PATH="$PHPCS_BIN_DIR:$PATH"
- phpcs --config-set installed_paths $(pwd)
- source $DEV_LIB_PATH/travis.install.sh

script:
- if find . -name "*.php" -exec php -l {} \; | grep "^[Parse error|Fatal error]"; then exit 1; fi;
- phpunit --filter WordPress /tmp/phpcs/tests/AllTests.php
- source $DEV_LIB_PATH/travis.script.sh
1 change: 1 addition & 0 deletions dev-lib
Submodule dev-lib added at 449182