Continuous integration is an important part of software development and has Many advantages, such as a faster development cycle, And higher software quality. Travis CI is a service that provides continuous integration and will test your software project for every change. Their service provides testing environments for many programming languages including C, C++, C#, Java, PHP, Python, Ruby, and just to name a few.
To Get Started with Travis Ci, You must Allow Travis To know about your GitHub public projects. Login to Travis CI and press the “+” button. Next, flick the repository switch on for your repo.
at First i did not see any of my repositories, but after i hit the sync button to refresh the list of public repositories.
Next is to create a .Travis.yml File in the root of The project repo to start a build configuration. This can vary from language to language and even if your project is using the command line.
- The ‘language’ section is used to specify the language of the software.
- The ‘python’ section is used to specify the version or versions of Python to use for testing.
- The ‘script’ section is used to specify the command to test your software. Typically, this command will find all tests in your project and run them. The specified command must exit with a status code of 0 if the test is successful; otherwise the test will be considered a failure.
Lastly is The Process of Triggering The Build. the step is very easy just push the commit that adds “.travis.yml” to the project, and Travis will get to work