I've been toying with Elixir a bit lately, and decided to see if I could Travis CI to build my project (currently named "ProjectTynamo"). Travis CI has support for erlang, so I figured it was possible (spoiler: it was).
So here's my .travis.yml file:
- git clone https://github.com/elixir-lang/elixir
- cd elixir
- git checkout v0.12.5
- cd ..
- make -C elixir
before_script: "export PATH=`pwd`/elixir/bin:$PATH"
script: "MIX_ENV=test mix do deps.get, test"
Line by line:
1: Specify that it's an erlang project
2-3: Specify the 17.0 release of erlang (elixir needs that or newer)
4-9: Download and build elixir. My project is using Dynamo, so I'm specifically targetting elixir v0.12.5 for now.
10: Make sure the elixir binaries are added to PATH
11: Run the mix command. I'm just getting the dependencies and doing "test", so I set the MIX_ENV to "test".