the fastest way to run tests on CI is ./gradlew test
or ./gradle build
. it will download all the necessary dependencies (which can be somehow cached on CI), run tests and produce artifact (jar file)
i also want to build a docker image. some of the options i considered:
-
build docker image on CI and assume that artifact is already there. it's the fastest way but ties the building process to CI. it can't be just build manually with 1 command (docker build)
-
run tests as part of docker build. on CI it takes more time before i get info about failing test (as it has to download image, dependencies etc). but it allows to easily build the docker locally (probably rarely used functionality but useful for local docker-compose for tests)
-
parameterized build to disable / enable tests by default
what's the standard way of handling those requirements? any best practices?
Aucun commentaire:
Enregistrer un commentaire