Build as separate docker step?
Hi, I've been playing with OpenFaaS for the past few days and just made my own PHP-cli for OpenFaaS. When building I checked out existing templates and it looks like most run tests as part of build (pretty cool idea and should keep functions more lightweight).
Are you open to a PR? I really like that you have php5 and php7.
@Lewiscowles1986 in the case of PHP, build step is not that much relevant since all extensions need to be installed for the final image, the same applies for libraries. Correct me if I miss something :-)
Maybe a build step for unit tests, but I hesitate to do testing in the build, I prefer doing tests separately from the build since build is more for deployment
@itscaro
in the case of PHP, build step is not that much relevant since all extensions need to be installed for the final image, the same applies for libraries.
I have no idea if you're talking about adding or compiling PHP + Extensions or application code, but the official PHP docker has your back as far as compiling PHP and providing a one-liner so you can add extensions before downloading dependencies.
Maybe a build step for unit tests
Precisely what I'm asking about adding. Not E2E, just phpunit.
I hesitate to do testing in the build, I prefer doing tests separately from the build since build is more for deployment.
This depends where you deploy to. If you deploy to production it's not just important to run unit tests but all tests. Similarly where you locate tests is up to you. My main concern is that we'll be encouraging poor quality PHP code that has no tests or is poorly understood by the authors and consumers.