-
Notifications
You must be signed in to change notification settings - Fork 16
Continuous Integration
Originally, Travis was used to automate testing after commits. For the season 2019/2020, a GitLab CI Pipeline was used. Currently, a similar GitHub Action Workflow is used.
The CI workflow in GitHub consists of three different jobs:
-
Test with JDK
-
Run linter
-
Create KDoc
These are described in more detail below. The results are visible on the action page of the project.
This job builds the project on Java 8 and Java 11 and runs automated tests, e.g. unit tests:
- ./gradlew check -x detekt -x spotlessCheck
- ./gradlew codeCoverageReport
Additionally, the code coverage is determinded and the result is printed. This allows for trend analysis of the test results on merge requests.
The lint job is used to do some static code analysis.
- ./gradlew spotlessCheck
- ./gradlew detekt
Spotless is a code formatting tool that does several reformatting operations on the whole code. Details can be found here: https://github.com/diffplug/spotless/tree/master/plugin-gradle
Detekt is a static code analysis tool to find code smells, code complexity deficits and much more. Details can be found here: https://arturbosch.github.io/detekt/
This job runs a gradle task for Dokka, the Kotlin homologue of JavaDoc:
- ./gradlew aggregatedDokka
If the job is executed on a master branch commit, this job moves the document artefacts to the needed doc branch for automatic deployment of GitHub Pages.