forked from consolidation/robo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hide progress indicator prior to 'exec'. (consolidation#707)
* Hide progress indicator prior to 'exec'. * Fix symfony2 scenario failure, and upgrade to composer-test-scenarios ^2 * Update minimum workable versions.
- Loading branch information
1 parent
a1c5ae8
commit 9a5d26c
Showing
10 changed files
with
156 additions
and
167 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,17 +11,17 @@ matrix: | |
fast_finish: true | ||
include: | ||
- php: 7.2 | ||
env: 'SCENARIO=symfony4 HIGHEST_LOWEST="update"' | ||
env: 'SCENARIO=symfony4 DEPENDENCIES=highest' | ||
- php: 7.1 | ||
env: 'SCENARIO=symfony4' | ||
- php: 7.0.11 | ||
env: 'HIGHEST_LOWEST="update"' | ||
env: 'DEPENDENCIES=highest' | ||
- php: 7.0.11 | ||
- php: 5.6 | ||
- php: 5.6 | ||
env: 'HIGHEST_LOWEST="update --prefer-lowest' | ||
env: 'DEPENDENCIES=lowest' | ||
- php: 5.5 | ||
env: 'SCENARIO=symfony2 HIGHEST_LOWEST="update --prefer-lowest' | ||
env: 'SCENARIO=symfony2 DEPENDENCIES=lowest' | ||
|
||
sudo: false | ||
|
||
|
@@ -30,84 +30,13 @@ cache: | |
- $HOME/.composer/cache | ||
|
||
install: | ||
- 'composer scenario "${SCENARIO}" "${HIGHEST_LOWEST-install}"' | ||
- 'composer scenario "${SCENARIO}" "${DEPENDENCIES}"' | ||
|
||
script: | ||
- composer test | ||
|
||
after_success: | ||
- travis_retry php vendor/bin/coveralls -v | ||
- | | ||
# Only do post-build actions in one environment, and only if there is a GITHUB token. | ||
if [ -z "$DO_POST_BUILD_ACTIONS" ] ; then | ||
return | ||
fi | ||
if [ -z "$GITHUB_TOKEN" ]; then | ||
echo "No GITHUB_TOKEN defined; exiting." | ||
return | ||
fi | ||
# Inject GITHUB_TOKEN into remote origin so that we have push access | ||
# to merge or create a pull request | ||
remote=$(git config --get remote.origin.url) | ||
git remote set-url origin "${remote/github.com/$GITHUB_TOKEN:[email protected]}" | ||
# If this is a PR that merges into the master branch, then try to merge it if it contains only composer.lock | ||
# n.b. TRAVIS_BRANCH is the branch the pull request will merge into. TRAVIS_PULL_REQUEST_BRANCH | ||
# is the branch that holds the commits for the pull request. | ||
if [ -n "$TRAVIS_COMMIT_RANGE" ] && [ -n "$TRAVIS_PULL_REQUEST_BRANCH" ] && [ "master" == "$TRAVIS_BRANCH" ]; then | ||
changed_files=$(git diff --name-status "$TRAVIS_COMMIT_RANGE" | tr '\t' ' ') | ||
if [[ "$changed_files" == "M composer.lock" ]] ; then | ||
( | ||
echo "Only composer.lock was modified: auto-merging to $TRAVIS_BRANCH in repository $remote." | ||
git status | ||
git reset "$TRAVIS_BRANCH" | ||
git stash | ||
git checkout "$TRAVIS_BRANCH" | ||
git stash pop | ||
git add composer.lock | ||
git commit -m "Auto-update dependencies in composer.lock from PR #$TRAVIS_PULL_REQUEST (https://github.com/$TRAVIS_REPO_SLUG/pull/$TRAVIS_PULL_REQUEST)." | ||
git push origin "$TRAVIS_BRANCH" | ||
) 2>&1 | sed -e "s/$GITHUB_TOKEN/REDACTED/g" | ||
else | ||
echo "Not auto-merging, because multiple files were changed" | ||
fi | ||
fi | ||
### | ||
# Run composer lock update on cron jobs. | ||
# See: https://github.com/danielbachhuber/composer-lock-updater | ||
### | ||
if [ "$TRAVIS_EVENT_TYPE" != "cron" ] ; then | ||
echo "Not a cron job; exiting." | ||
return | ||
fi | ||
### | ||
# Only run on one job of a master branch build | ||
### | ||
if [ "master" != "$TRAVIS_BRANCH" ] ; then | ||
echo "composer.lock update only runs on the master branch." | ||
return | ||
fi | ||
### | ||
# Install composer-lock-updater | ||
### | ||
export PATH="$HOME/.composer/vendor/bin:$PATH" | ||
composer global require danielbachhuber/composer-lock-updater | ||
### | ||
# Optional: install Sensio Labs security checker to include security advisories in PR comments | ||
### | ||
mkdir -p $HOME/bin | ||
wget -O $HOME/bin/security-checker.phar http://get.sensiolabs.org/security-checker.phar | ||
chmod +x $HOME/bin/security-checker.phar | ||
export PATH="$HOME/bin:$PATH" | ||
### | ||
# Install hub for creating GitHub pull requests | ||
### | ||
wget -O hub.tgz https://github.com/github/hub/releases/download/v2.2.9/hub-linux-amd64-2.2.9.tgz | ||
tar -zxvf hub.tgz | ||
export PATH=$PATH:$PWD/hub-linux-amd64-2.2.9/bin/ | ||
### | ||
# Run composer-lock-updater | ||
### | ||
clu | ||
|
||
# Prior to a deploy, build a fresh robo.phar | ||
before_deploy: | ||
|
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Oops, something went wrong.