Keep your GitHub project built with Travis CI

Source: Internet
Author: User

Travis CI is a newly emerging open source continuous integration construction project, it and Jenkins,go is very obvious especially in the use of YAML format, concise and fresh unique. Most github projects are now moving into the Travis CI build queue, which is said to run more than 4,000 full builds per day for Travis Ci. For open source projects or users of GitHub, if your project has not yet joined the Travis CI build queue, then I really want to say out to you.

Here is the history of my Build:

To build the Travis CI build, you need a GitHub account and a GitHub project:

1: Login to Travis CI with GitHub account.

2: In the upper right corner of your account name, click on Enter accounts, on repositories tab Click Sync Now sync your github project,

3: The selected item will change the default off to on to enable continuous integration of the project.

4: Create a. travis.yml file in the root directory of your project, with the content:

Language:node_js

NODE_JS:

-0.4

-0.6

5: In the Open your node. js Package.json file, make sure to join the Script/test node:

"Scripts": {
"Test": "XXXX"
},

It's a pity you chose the test commands for the node. JS test framework such as MAK or Jasmine-node. And can add dependencies to the package depends

6: Run NPM Test in your project to make sure it works.

7:check in your code to GitHub, and the Tracivsci interface waits for it to sync and run your build build.

If you need to put your build build status in a prominent location or project Readme, you can find the item in the home my repositories and set the copy status picture in code, like this:

[! [Build Status] (Https://travis-ci.org/greengerong/qing.png?branch=master)] (https://travis-ci.org/greengerong/qing)

Travs CI supports multiple languages such as Ruby,java Maven,gradle,go, etc. see document Travis Docs.

In the above mentioned Travis.yml file we can also join the build before and after the script, such as:

Before_script:

-Before_command_1

-Before_command_2

After_script:

-After_command_1

-After_command_2

Adding your open source project to the Travis CI queue makes it easy for your project to join continuous integration and build queues.

Keep your GitHub project built with Travis CI

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.