scalaquest / PPS-19-ScalaQuest

An exam project. From UNIBO, for the course "Paradigmi di Programmazione e Sviluppo", 2019-2020.
https://scalaquest.github.io/PPS-19-ScalaQuest/
MIT License
5 stars 0 forks source link

CI infrastructure (Scala + Gradle) #3

Closed maldins46 closed 3 years ago

maldins46 commented 3 years ago

A CI basic infrastructure must be implemented in order to perform build and test tasks within all Gradle subprojects. Some deepening needs to be carried out, as integrating Gradle and Scala in a CI infrastructure is not immediate (the standard is SBT). Working on it by now.

maldins46 commented 3 years ago

Anyway, other tasks can now start without problems, in parallel, as the basic multi-project infrastructure is ready.

maldins46 commented 3 years ago

I'm currently working on the branch feature/ci. The initial idea was to run the build in a GH Actions job, using an OS matrix, then perform tests in another subsequent job. Anyway, passing the working directory between jobs is somewhat tricky, even if possible. I think the best way to implement the build-test part is to include it in a single job, also because using Gradle, the build process is tightly linked to tests.

In addition, I added and configured a Gradle plugin called Spotless, a formatter plugin/linter for Scala. This is the first QA effort aimed directly at the Scala code (an equivalent is active yet for the Kotlin code, Detekt). Controls are strict, so that the build fails if the code is not well-formatted: we can discuss this point, if this is problematic, at least in the feature branches. Bonus point for this plugin: Spotless has a task called spotlessApply that applies automatically code formatting.

maldins46 commented 3 years ago

Everything is ready. I added a scalafmt configuration file to recognize scalafmt. Rebasing and closing issue now.