I want to run tests of my Phoenix app on Travis-CI.
$ MIX_ENV=test mix do deps.get, compile, test
Could not find hex, which is needed to build dependency :phoenix
Shall I install hex? [Yn]
When it comes to fetching and installing dependencies, it asks if it should install
hex. I was wondering if I can pass a
--yes option to mix so that it doesn't ask but just installs?
As with any unix command, you could pipe
yes into the mix command:
yes | MIX_ENV=test mix do deps.get, compile, test
But there are some warnings about this solution in the comments below. I recommend using the top voted solution!