actions-ember-testing
actions-ember-testing copied to clipboard
Move most of Dockerfile to pre-built image
As far as I know right now, the current setup has the Chrome installation happen each time that the tests run. It doesn't take that long but it's probably unnecessary.
This happens because installing Chrome happens in the local Dockerfile, which is executed to run the Action. If you can view the following link, you'll see that step 10/13 seems fairly expensive and is responsive for installing Chrome
https://github.com/alexlafroscia/ember-steps/runs/125208015
What could be done instead is providing an external Docker image that the local one extends from that comes with Node and Chrome already, so that set only happens once, and the Action only needs to build and test the Ember app.
Pros
- Faster build time
Cons
- More work to maintain
- Extra Dockerfile
- Extra image needs to be uploaded to Dockerhub and maintained over time
- Loose out on automatically getting the latest updates to the specified Node version
hey, just a heads-up that I needed such an image for a non-GitHub-Actions CI setup, so created a repo for this that is being autopublished to docker hub as gabrielgrant/node-chrome
AFAICT you should just be able to inherit from that if you want, but let me know if it's not working for you for whatever reason
That’s great! I have my own node-chrome
Docker image that I made recently, but it’s “private” to the company I work for. I’m glad to see you’ve made one that’s public!
I don’t really work on this anymore, but if I come back to it at some point, I’ll check your image out!