You will need roughly 2 minutes to read this article.
For example if you want to install 1.8.1, set that version as an environment variable in your project or add this in the Setup Commands. Elixir requires Erlang as well so you should also configure the necessary Erlang version here:
export ERLANG_VERSION=21.2 export ELIXIR_VERSION=1.8.1
Next, add these commands to your Setup Commands and the scripts will automatically be called at build time.
source /dev/stdin <<< "$(curl -sSL https://raw.githubusercontent.com/codeship/scripts/master/languages/erlang.sh)" source /dev/stdin <<< "$(curl -sSL https://raw.githubusercontent.com/codeship/scripts/master/languages/elixir.sh)"
Installing dependencies via hex is supported once Elixir has been installed, as per the instructions above.
We do not cache Elixir dependencies between builds.
Elixir frameworks such as Phoenix, and test tools such as ExUnit, are all supported on CodeShip. Note that you will need to manually install all tools needed, in your project’s setup commands.
If you are running parallel test pipelines, you will want separate your tests into groups and call a group specifically in each pipeline. For instance:
mix test tests/tests_1.exs
mix test tests/tests_2.exs
In addition to parallelizing your tests explicitly via parallel pipelines, some customers have found using ExUnit’s built-in test parallelization is a good way to speed up your tests.
Note that aggressive parallelization can cause resource and build failure issues, as well.
Due to Elixir version and build issues, you may find it helpful to tests your commands with different versions via an SSH debug session if tests are running differently on CodeShip compared to your local machine.
Contact our support team or post on Stack Overflow using the tag
#codeship. Did you check the status page and changelog?
There are also several code examples and sample projects available for you to get started with.