Go-srs with Travisci

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

Go-srs with Travisci

Go test support is better, GitHub and Travisci integration is very good, so Go-srs not only can do TDD test drive, and can be very convenient ci, a little bit does not increase the cost of use.

GO Test

The premise of CI is that TDD is perfect, and go is good for test, execute command:

gogo test .

You can run the Go-srs test with the following results:

localhost:gogo test .ok      _/Users/winlin/go-srs   0.004s

Go will find out all the test and execute it.

Travis CI

GitHub can add a service to the project's settings, in fact, each time pullrequest merge, if there is no integrated CI, will be prompted to add CI.

Travis CI after GitHub is turned on, you only need to add a file description file to your project .travis.yml :

languagegogo:    - 1.4

In fact, you can just need the first line.

This will automatically run CI every time Pullrequet, as well as push. Especially pullrequest, will be very convenient, if not pass test, will prompt error:

Once again update the code, such as in, update feature/ci , push this branch, will automatically run CI and update pullrequest:

After a while, the build test succeeds:

Then the merge code is ready.

Documents for Travise CI: https://travis-ci.org/getting_started

Documents for Travise CI go language: http://docs.travis-ci.com/user/languages/go/

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.