Elixir

Versions And Setup

We currently don’t have Elixir pre-installed on our build VMs so we’d recommend using our Docker platform or downloading Elixir via the shell commands in your project’s setup commands.

The easiest way to do this is by using our scripts repository, specifically the Erlang and Elixir scripts both. After connecting your repository, you can add these setup commands that will automatically download Elixir and Erlang. Both are needed to be able to run Elixir.

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)"

The setup looks like this: Elixir Setup

Dependencies

Installing dependencies via hex is supported once Elixir has been installed, as per the instructions above.

Dependency Cache

We do not cache Elixir dependencies between builds.

Notes And Known Issues

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.

Frameworks And Testing

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.

Parallelization

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.

Need More Help?

Get in touch if you need more help, or post on Stack Overflow using the tag #Codeship.

  • Ask The Helpdesk A Question
  • Code Examples And Sample Projects
    • Was This Article Helpful?