-
Notifications
You must be signed in to change notification settings - Fork 489
Update .travis.yml for latest conventions, use fast_finish, test with -race. #279
Conversation
… -race. This change follows #277, but updates .travis.yml to use latest conventions as documented at https://docs.travis-ci.com/user/languages/go#Specifying-a-Go-version-to-use. Specifically, use master instead of tip to refer to latest (unreleased) version of Go. Use .x to target latest patch releases of each point release of Go. Use fast_finish to speed up build reporting with no semantic change. It's documented at https://blog.travis-ci.com/2013-11-27-fast-finishing-builds/. Use race detector when running tests.
Thanks for the improvements. What's the difference between |
…ucture. If lint doesn't do anything that would require sudo access, it's a good idea not to require sudo access. This allows the builds to run on Travis' newer container-based infrastructure, which are not considered legacy and should run faster. See https://docs.travis-ci.com/user/migrating-from-legacy/ for details.
I've updated the PR with a3a7dd9, see its commit message for rationale.
No problem!
There is no functional difference, they are equivalent aliases. The only difference is that |
Some observations from the Travis build that ran on this PR. You can see the effect of Second, the container-based builds for 1.8.x and 1.7.x took around 40 seconds, while the previous ones took 30 seconds. See this screenshot. However, Edit: Actually, I forgot that the tests now run with |
Thanks for the explanations; it's improving my knowledge of how travis works. It would be nice if there was someway for failures on /cc @bradfitz with regard to travis tip testing. |
The main barrier of automating this efficiently, IMO, is the chance for false positives. The current situation, as far as I know, is that open source project maintainers typically glance at the It might not be the most effective solution, but it does work to some degree. I think improving upon that is quite non-trivial. But it's certainly worth looking for ways to do better. |
@dsnet, an example of what I described above that I recently ran into follows: I spotted a Go master-only failure recently in go-github repository. I investigated and made a fix PR (not to be merged right away, but for discussion) at google/go-github#568, found a relevant issue in the Go project and made a reference there. |
Please consider these changes to
.travis.yml
that follow #277:Update to use latest conventions as documented at https://docs.travis-ci.com/user/languages/go#Specifying-a-Go-version-to-use. Specifically, use
master
instead oftip
to refer to latest (unreleased) version of Go.Use
.x
to target latest patch releases of each point release of Go.Use
fast_finish
to speed up build reporting with no semantic change. It's documented at https://blog.travis-ci.com/2013-11-27-fast-finishing-builds/.Use race detector when running tests. It should be a good idea to do this.
Do not require
sudo
access, since it's not required. This allows Travis to use container-based infrastructure.I'm happy to receive feedback on the changes and discuss them. I wanted to contribute these improvements because this is a visible project, and I want its
.travis.yml
file to serve a better role model for people learning how they can structure their.travis.yml
file for their Go repositories.