DevOps guide

Build automation

This project uses Gradle for build automation and dependency management. You are recommended to read this Gradle Tutorial from the se-edu/guides.

Given below are how to use Gradle for some important project tasks.


Continuous integration (CI)

This project uses GitHub Actions for CI. The project comes with the necessary GitHub Actions configurations files (in the .github/workflows folder). No further setting up required.

Code coverage

As part of CI, this project uses Codecov to generate coverage reports. When CI runs, it will generate code coverage data (based on the tests run by CI) and upload that data to the CodeCov website, which in turn can provide you more info about the coverage of your tests.

However, because Codecov is known to run into intermittent problems (e.g., report upload fails) due to issues on the Codecov service side, the CI is configured to pass even if the Codecov task failed. Therefore, developers are advised to check the code coverage levels periodically and take corrective actions if the coverage level falls below desired levels.

To enable Codecov for forks of this project, follow the steps given in this se-edu guide.

Repository-wide checks

In addition to running Gradle checks, CI includes some repository-wide checks. Unlike the Gradle checks which only cover files used in the build process, these repository-wide checks cover all files in the repository. They check for repository rules which are hard to enforce on development machines such as line ending requirements.

These checks are implemented as POSIX shell scripts, and thus can only be run on POSIX-compliant operating systems such as macOS and Linux. To run all checks locally on these operating systems, execute the following in the repository root directory:

./config/travis/run-checks.sh

Any warnings or errors will be printed out to the console.

If adding new checks:


Making a release

Here are the steps to create a new release.

  1. Update the version number in MainApp.java.
  2. Generate a fat JAR file using Gradle (i.e., gradlew shadowJar).
  3. Tag the repo with the version number. e.g. v0.1
  4. Create a new release using GitHub. Upload the JAR file you created.