If you watch flatiron repositories on GitHub, you may have started noticing these:
What is Travis CI?
Travis CI is a continuous integration system. Long story short: continuous integrations systems run your tests. How is it different from running them yourself?
- clean environment - your local development environment can be pretty weird and you know it! People who use your code don't necessarily have the same settings as you have
- easy creation of test environments
- it actually runs the tests - continuous integration system won't say 'this change is so small that it can't mess anything up'
- build logs are publicly visible - transparency is important, especially when it's about something other people rely on
- it's nearly realtime - we often push code and almost instantly get notified about test results
Why is it important for a CI to be realtime?
People make mistakes. Developers forget to
npm update before
npm test, keep their temporatory files and so on. You can probably write down a long list of silly mistakes you sometimes make. This can lead to pushing failing code.
Of course, Marak doesn't do that. At least nobody can confirm it.
So, we delivered a product in 5 minutes. Sounds like a heaven for project managers.
OK, so how does this "realtime" thing look like? Many of us spend our time on #nodejitsu IRC channel at Freenode. Thus, a natural thing was to enable IRC notifications for builds.
I can definitely agree with Marak here. Point of this notifications is not only to tell you that you failed. We want people to know that their changes were good!
We care about innovating. We care about our code being compatible with newer versions of software (
npm and so on), but we have to care about people using older versions.
How can Travis help? Travis lets you to set up multiple test environments which target different runtime version. It's really easy to run your tests in
node v0.6 and
node v0.4 at the same time with just 3 lines in your
.travis.yml file (detailed instructions for node.js are available here).
language: node_js node_js: - 0.4 - 0.6
Build you get looks like that.
Travis is easy!
Travis is a hosted service - you don't need a sysadmin to setup a Jenkins server for you. All you need is
.travis.yml file and enabled GitHub post-receive hook (which Travis can do for you!).
Besides Node.js, travis-ci.org offers first class support for several other technologies:
We're having a great time with Travis. It helped us find a few regressions, bugs and compatibility issues. If you're starting or if you have an open source project, you should add it to Travis. Show people that you care about your test results!