Closed sneridagh closed 3 years ago
Thank you @sneridagh
It should already work with local volumes:
I'd love to learn more about the jest config extender.
@avoinea https://docs.voltocms.com/developer-guidelines/testing/#jest-configuration-override
Something I added along with the Razzle upgrade in Volto 9. The use case is precisely the one you have in here. It's only required to have the config keys you have to override, it gets merged with the main Volto one.
@avoinea oh you are correct, no need for my first request! :) I will work on the other two then if you think is worth it.
@sneridagh I have a feeling that also the second one works :smile:
Try passing the RAZZLE_JEST_CONFIG
env to the container, like:
docker run -e RAZZLE_JEST_CONFIG=jest-addons.config.js ...
@avoinea lol you are right!! Too much work last days! :P
And for the third, it's a matter of modify the call I guess like:
docker run -it --rm ... eeacms/volto-test bash -c "set -o pipefail; yarn test"
But yes, the jest config extender sounds good:
We should also consider having this image on plone repo and DockerHub like:
docker run plone/volto-test
Or maybe a better name:
Sounds good. Seems that I don't have the rights to create new repos on plone:
@avoinea outrageous! here it is: https://github.com/plone/volto-addon-ci
git push
ERROR: Permission to plone/volto-addon-ci.git denied to avoinea.
fatal: Could not read from remote repository
Hi @avoinea ! I tested it and it's awesome! Your craftsmanship of docker images is legendary :)
However, I miss from it three features:
I would love to use it locally too, mounting the current addon directory in this fashion:
docker run -it --rm -e GIT_NAME=volto-blocks -v $(pwd):/opt/frontend/my-volto-project/src/addons/volto-blocks eeacms/volto-test test
so I would like it to have a method of not doing all the git clone dance.
-e NOCLONE
or something like that, so we can plug directly the current directory. (I already tested manually, no parameter, and works like a charm).Also, if possible, run the tests in a non CI way, so:
using another parameter to choose from... maybe we can unify both features with a
-e LOCAL
or so.Finally, using the jest config extender we introduced lately would be great, instead of using bare jest override.
What do you think? I can try to put together a PR with it. Then we can add it to the generator as a generic method for test/lint etc addons.
Thanks!