From 742cd367b0d552202d5bcdd7544eb99fc0e480fc Mon Sep 17 00:00:00 2001 From: Rodrigo Primo Date: Mon, 20 Nov 2017 17:18:29 -0200 Subject: [PATCH] Prevent Travis builds duplication This commit changes Travis configuration file to specify a list of branches that it should build. This way Travis will only create a new build when a commit is pushed to the master branch and release branches and when tags are created. The behavior for PRs is not modified and PR creation and updates will still trigger builds. Doing this to speed up Travis build by preventing it from running two builds for PR that are created from a branch of the same repository. Before this change, Travis would create a build when the branch is pushed to GitHub (continuous-integration/travis-ci/push) and another one when the PR is created (continuous-integration/travis-ci/pr). For an example, see https://github.com/woocommerce/woocommerce/pull/17680. --- .travis.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.travis.yml b/.travis.yml index 170d075ef60..9bfdf909036 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,3 +37,10 @@ script: after_script: - bash tests/bin/travis.sh after + +# Specifies that Travis should create builds for master and release branches and also tags. +branches: + only: + - master + - /^\d+\.\d+(\.\d+)?(-\S*)?$/ + - /^release\//