Optimize CI workflow
This merge request would optimize the CI workflow as discussed in #21 (closed).
FULL OPTIMALIZATION CAN ONLY BE ACHIEVED BY MERGING !141 (merged) AS WELL
It now consists of the following stages:
-
validate: Runs ESLint and Checkstyle. Checkstyle will no longer be part of thevalidateMaven stage as that is run beforeinitialize. These jobs do not generate any artifact but might fill up the cache of some runners. -
compile: Runs all Maven phases up to and including thecompilelifecycle. This will compile all classes and also includes theprocess-resourcesstage which compiles the front-end code. It provides an artefact which contains the target folder for the next stages. -
test: Runs all Maven phases up to and including lifecycletest, but uses the artefact of thecompilestage to overcome the need to compile all code again. This should only generate test resources, compile test classes and run the tests. This stage will not produce a newtargetfolder as artefact, but will produce an artefact with the test reports, as was already the case in the previous workflow. -
package: This stage runs all Maven phases up to and including thepackagelifecycle, but excludes the tests using-DskipTests. It will use the artefact of thecompilestage, so all the code should already be compiled at this point. The only things this stage does is building the documentation usingasciidoctor(providing !141 (merged) is merged) and package the classes into a fat JAR, which will be provided as an artefact. -
deploy: Only ran for tags and release branches, this will provide the Quizzard JAR as a GitLab pages download. No fancy static website, just a JAR deployed publicly.
Edited by Deleted user