summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Stufft <donald@stufft.io>2017-02-15 01:21:32 (GMT)
committerBrett Cannon <brettcannon@users.noreply.github.com>2017-02-15 01:21:32 (GMT)
commit984eef7d6d78e1213d6ea99897343a5059a07c59 (patch)
treec3c0fdc0291a8c39e48bc35f6240fa6e803041b3
parentb52260d8bf392aa04c48b8c2467a4c034184de86 (diff)
downloadcpython-984eef7d6d78e1213d6ea99897343a5059a07c59.zip
cpython-984eef7d6d78e1213d6ea99897343a5059a07c59.tar.gz
cpython-984eef7d6d78e1213d6ea99897343a5059a07c59.tar.bz2
Only run Travis tests on master and X.Y branches (GH-102)
If someone pushes a branch to python/cpython and then creates a PR it will cause Travis to run tests needlessly, once for the PR and once for the push. This will limit the branches that Travis will run tests for to the `master` branch and branches that match the regex `^\d\.\d$`. This will have the effect that if someone purposely makes another branch they won't get tests to run, but in that rare case they can adjust this themselves.
-rw-r--r--.travis.yml5
1 files changed, 5 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
index f9e6214..96cd9fd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,6 +6,11 @@ group: beta
# To cache doc-building dependencies.
cache: pip
+branches:
+ only:
+ - master
+ - /^\d\.\d$/
+
os:
- linux
# macOS builds are disabled as the machines are under-provisioned on Travis,