I am very new to Git and I am planning to contribute to some open-source project on GitHub after discovering a small error in it. Upon forking it and fixing the error, I purposed a pull request and I noticed this showing up:
Failed — The Travis CI build failed
Looking into the details I discovered it was caused by Could not find .travis.yml
, which made perfect sense since I had not signed in to Travis Cl with and add .travis.yml to the repository.
This is my first time hearing about Travis and what that is known as continuous integration. And it sounds pretty cool so in order to learn more about it, I looked it up on Wikipedia.
Travis CI is a hosted, distributed continuous integration service used to build and test projects hosted at GitHub. Travis CI automatically detects when a commit has been made and pushed to a GitHub repository that is using Travis CI, and each time this happens, it will try to build the project and run tests. This includes commits to all branches, not just to the master branch.
My current understanding of Travis CI is that what it does is automatically pushing the project upon git commit -am ".."
and I don't quite understand some part of it.
By building the project and run tests, what tests is it going to run? And how is it going to "build" the project? (like compiling it to binary?)
It states that "This includes commits to all branches" - but what if I don't want to commit to all branches?
Is it alright if I don't use Travis Cl at all? Under what circumstances is it best to use it (or it must be used)?
Travis CI is a hosted continuous integration service used to build and test software projects hosted on GitHub and Bitbucket. Travis CI was the first CI service which provided services to open-source projects for free and continues to do so.
travis. yml is a configuration file, which provides instructions to the testing and building software on how to run tests and build any files required by the project. This file is part of the repository's git repository.
Travis CI is a commercial CI tool, whereas Jenkins is an open-source tool. Travis CI takes very less time to get started, while Jenkins needs elaborate setup. Travis CI offers less customization option, whereas Jenkins offers vast customization options.
Amongst all the CI/CD tools, Travis CI is undoubtedly one of the most popular choices. Initially, it was created for open source projects but with time, the tool has also migrated to close source projects.
The simplest way to explain Travis CI is that it runs your program's tests every time you commit to GitHub (this can be configured in many ways, and you can always disable builds on some branches). The point of this is that you can often discover very quickly if your commit broke something, and fix it before it becomes a problem. I would recommend running Travis CI on every GitHub repo that you have unit tests in and is using a programming language supported by Travis CI. Since setting up Travis CI is very easy, I don't normally see a good reason not to use it, unless you don't care if you have passing tests in your program or not. Feel free to leave a comment if you have any more questions. You can read more about Travis CI here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With