Instantly share code, notes, and snippets.

Embed
What would you like to do?
Elixir configuration for Circle CI
machine:
node:
version: 6.2.0
environment:
PATH: "$HOME/.asdf/bin:$HOME/.asdf/shims:$PATH"
dependencies:
cache_directories:
- ~/.asdf
- _build
- deps
pre:
- if ! asdf | grep version; then git clone https://github.com/HashNuke/asdf.git ~/.asdf; fi
- if ! asdf plugin-list | grep erlang; then asdf plugin-add erlang https://github.com/HashNuke/asdf-erlang.git; fi
- if ! asdf plugin-list | grep elixir; then asdf plugin-add elixir https://github.com/HashNuke/asdf-elixir.git; fi
- echo "erlang 18.2.1" >> .tool-versions
- echo "elixir 1.2.3" >> .tool-versions
- erlang_version=$(awk '/erlang/ { print $2 }' .tool-versions) && asdf install erlang ${erlang_version}
- elixir_version=$(awk '/elixir/ { print $2 }' .tool-versions) && asdf install elixir ${elixir_version}
- yes | mix deps.get
- mix local.rebar
test:
override:
- mix test
- mkdir -p $CIRCLE_TEST_REPORTS/exunit
- cp _build/test/results.xml $CIRCLE_TEST_REPORTS/exunit
@benbarber

This comment has been minimized.

Show comment
Hide comment
@benbarber

benbarber May 12, 2016

For Circle CI test reporting you will need to add jUnit formatter into your project and set it to write to results.xml in your _build/test folder. If you don't want to add this you can remove the last two lines from your circle.yml.

- mkdir -p $CIRCLE_TEST_REPORTS/exunit
- cp _build/test/results.xml $CIRCLE_TEST_REPORTS/exunit
Owner

benbarber commented May 12, 2016

For Circle CI test reporting you will need to add jUnit formatter into your project and set it to write to results.xml in your _build/test folder. If you don't want to add this you can remove the last two lines from your circle.yml.

- mkdir -p $CIRCLE_TEST_REPORTS/exunit
- cp _build/test/results.xml $CIRCLE_TEST_REPORTS/exunit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment