-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Actually cache on Travis push builds #24239
Conversation
.travis.yml
Outdated
# do not store cache for PR builds | ||
- if [[ $TRAVIS_PULL_REQUEST ]]; then exit $TRAVIS_TEST_RESULT ; fi | ||
# do not store cache for non-push builds | ||
- if [[ $TRAVIS_EVENT_TYPE != push ]]; then exit $TRAVIS_TEST_RESULT ; fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does push need quotes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked by changing it to $TRAVIS_EVENT_TYPE == pull_request
. Works without quotes
.travis.yml
Outdated
# do not store cache for PR builds | ||
- if [[ $TRAVIS_PULL_REQUEST ]]; then exit $TRAVIS_TEST_RESULT ; fi | ||
# do not store cache for non-push builds | ||
- if [[ $TRAVIS_EVENT_TYPE != push ]]; then exit $TRAVIS_TEST_RESULT ; fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Travis conditionals might work too. See https://docs.travis-ci.com/user/conditions-v1
before_cache:
# do not store cache for pull request builds
- exit $TRAVIS_TEST_RESULT
if: type = pull_request
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm a build wouldn't start with this, seems like invalid config.
Ahem... PTAL 🤗 |
No description provided.