Every push a build with Travis CI

Build and test your software projects automatically

I wanted that cool build passed badge for my projects as I have seen at Github.

So I had a look at Travis CI, which is a continuous integration service used to build and test software projects. Let’s have a look at the build file.

.travis.yml

language: java

That’s it. I tried Travis with one of mine projects. I use gradle as a build tool.

Build errror!? Why? ./gradlew assemble doesn’t work? Mmmh, okay that’s right. I didn’t used that logging library.

Build failed. Again. What? The integration test failed? I did a really small change. I thought that change couldn’t break the test. False! I commited and pushed the changed without testing.

Unbelievable, I needed more than 3 attempts. Finally, my github project was built successfully with Travis. Now my current travis file looks like this:

language: java
notifications:
 email:
 recipients:
 - my@mail.com
 on_failure: always

For that cool badge I added the following in my README file .

[![Build Status](https://travis-ci.org/your_account/you_project.svg?branch=master)](https://travis-ci.org/your_account/you_project)

 

If you like, you can add a lot of other badges, e.g. for code coverage, docs, number of downloads, version or license. Travis CI is cool 🙂

 

Links

https:/travis-ci.org

https://shields.io/