Skip to content

Commit

Permalink
travis: avoid double builds on pull requests
Browse files Browse the repository at this point in the history
Build only commits on master and release tags for the
"Build pushed branches" feature.

This prevents building twice on PRs originating from our repo
("Build pushed pull requests)".

Change-Id: Icdf54fb6ebbb67222cc55c624d4ba0e284650e60
  • Loading branch information
ssbarnea committed Feb 13, 2019
1 parent 33749f1 commit ba0de4c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
---
language: python

# Build only commits on master and release tags for the "Build pushed branches" feature.
# This prevents building twice on PRs originating from our repo ("Build pushed pull requests)".
# See:
# - https://github.com/travis-ci/travis-ci/issues/1147
# - https://docs.travis-ci.com/user/pull-requests/#double-builds-on-pull-requests
branches:
only:
- master
- /v[0-9]+\.[0-9]+\.[0-9]+(-.*)?$/

cache:
- pip
- directories:
Expand Down

0 comments on commit ba0de4c

Please sign in to comment.