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

Actually cache on Travis push builds #24239

Merged
merged 3 commits into from
Aug 30, 2019
Merged

Conversation

estherkim
Copy link
Collaborator

No description provided.

.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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does push need quotes?

Copy link
Collaborator Author

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
Copy link
Contributor

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

Copy link
Collaborator Author

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.

@estherkim
Copy link
Collaborator Author

Ahem... PTAL 🤗

@estherkim estherkim merged commit 8f2becd into ampproject:master Aug 30, 2019
@estherkim estherkim deleted the oh-travis branch August 30, 2019 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants