Just to learn how to use travis-ci in a java project!
This is a working minimal example of how to use Travis CI (and Codecov) with Java on GitHub.
- It uses the JUnit testing framework
Click here for the example using GitHub Actions instead of Travis CI
- Fork this Repository
- Go to Travis CI and enable the repository
- Fix the
README.mdbadges (replacing in the URLjoaomlnetowithyour-github-username) and push the changes. This should trigger a build in Travis CI!
This repository also integrates with Codecov to generate reports.
What's done for you:
- The JaCoCo plugin is included in
pom.xml - On
.travis.yml,after_successtarget executes the Codecov script.
If you want to use it:
- Go to the Codecov website and create an account and setup permissions.
- Add your repository (you can go there directly by going to https://codecov.io/gh/your-github-username/travis-ci-tutorial-java)
- Fix the
README.mdbadge.
If you don't want it:
- Remove the JaCoCo plugin from the
pom.xml. - Remove the
after_successtarget in.travis.yml - Remove the badge from
README.md
Spotted a mistake? Questions? Suggestions?
Open an Issue!