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

Restrict CI to only building the master branch #443

Merged
merged 2 commits into from
Feb 11, 2017
Merged

Conversation

DRMacIver
Copy link
Member

@DRMacIver DRMacIver commented Feb 10, 2017

This is a bit of a speculative PR and I'd like to discuss it before merge.

Travis has an annoying behaviour for pull requests where it builds each pull request twice: Once for the branch, once for the merge commit.

Given Hypothesis's painfully slow builds this is rather frustrating.

As per the Travis documentation we can turn this off and only have it build master. This should still build pull requests, or at least it was the suggested fix for travis-ci/travis-ci#1147.

Do you think this is a good idea? It solves quite an annoying problem but I don't know how annoying not having the CI builds for our branches when we're working on them will be. It would be nice to be able to trigger Travis to run a particular commit manually but I don't think we can.

Update: This now should also do the same thing for appveyor (as per documentation)

@DRMacIver DRMacIver changed the title Restrict Travis to only building the master branch Restrict CI to only building the master branch Feb 10, 2017
@DRMacIver
Copy link
Member Author

@palfrey pointed out on Twitter that a way to force a branch to build is just to create a WIP PR for it, which seems a pretty reasonable solution to me.

Copy link
Contributor

@alexwlchan alexwlchan left a comment

Choose a reason for hiding this comment

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

tl;dr: I am 👍 this change.

Do you think this is a good idea?

Yes. Faster builds on PRs = better.

It solves quite an annoying problem but I don't know how annoying not having the CI builds for our branches when we're working on them will be.

I think the slowness of PR builds is more annoying than the hypothetical problem of not having CI against branches – particularly because I lean towards having WIP pull requests for branches that are anywhere near mergeable.

A lot of branches with WIP code are only tested manually/locally – I’d guess that CI against those branches would often fail, but not with particularly useful errors.

And if we do have a long-lived branch that we want builds on, but for some reason don’t want a PR, we can always put it back in.

It would be nice to be able to trigger Travis to run a particular commit manually but I don't think we can.

Agreed.

@alexwlchan
Copy link
Contributor

(Related: #444)

@DRMacIver DRMacIver merged commit b0b1fb3 into master Feb 11, 2017
@DRMacIver DRMacIver deleted the DRMacIver/only-prs branch February 11, 2017 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants