Travis CI is a Continuous Integration platform for GitHub projects.
Travis CI can run the projects' tests automatically whenever new code is pushed to the repo. This ensures that existing functionality and features have not been broken by the changes.
The current Travis CI set up performs the following things whenever someone push code to the repo:
- Runs the
./gradlew clean headless allTests coverage coveralls -i
command (see UsingGradle.md for more details on what this command means). - Automatically retries the build up to 3 times if a task fails.
If you would like to customise your travis build further, you can learn more about Travis from Travis CI Documentation.
-
Fork the repo to your own organization.
-
Go to https://travis-ci.org/ and click
Sign in with GitHub
, then enter your GitHub account details if needed.
-
Head to the Accounts page, and find the switch for the forked repository.
-
If the organization is not shown, click
Review and add
as shown below:
This should bring you to a GitHub page that manages the access of third-party applications. Depending on whether you are the owner of the repository, you can either grant access
or request access
to Travis CI so that it can access your commits and build your code. -
If repository cannot be found, click
Sync account
-
-
This repo comes with a
.travis.yml
that tells Travis what to do. So there is no need for you to create one yourself. -
To see the CI in action, push a commit to the master branch!
-
If the build is successful, you should be able to check the coverage details of the tests at Coveralls
-
Update the link to the 'build status' badge at the top of the
README.md
to point to the build status of your own repo.