Skip to content

Commit d221af5

Browse files
committed
Enable building pull requests on Travis
See: integer-net/magento2-module-template@6725ffc
1 parent b472229 commit d221af5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.travis/before_script.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ composer config repositories.travis_to_test git https://github.com/$TRAVIS_REPO_
2828
if [ ! -z $TRAVIS_TAG ]
2929
then
3030
composer require ${COMPOSER_PACKAGE_NAME}:${TRAVIS_TAG}
31+
elif [ ! -z $TRAVIS_PULL_REQUEST_BRANCH ]
32+
then
33+
# For pull requests, use the remote repository
34+
composer config repositories.travis_to_test git https://github.com/${TRAVIS_PULL_REQUEST_SLUG}.git
35+
composer require ${COMPOSER_PACKAGE_NAME}:dev-${TRAVIS_PULL_REQUEST_BRANCH}\#${TRAVIS_PULL_REQUEST_SHA}
3136
else
3237
composer require ${COMPOSER_PACKAGE_NAME}:dev-${TRAVIS_BRANCH}\#${TRAVIS_COMMIT}
3338
fi

0 commit comments

Comments
 (0)