Skip to content

Instantly share code, notes, and snippets.

@schneidmaster
Last active January 19, 2018 10:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schneidmaster/c6bf3c82eacac41cff59c941207289fd to your computer and use it in GitHub Desktop.
Save schneidmaster/c6bf3c82eacac41cff59c941207289fd to your computer and use it in GitHub Desktop.
Elixir/Phoenix + CircleCI config
erlang 18.0
elixir 1.3.2
machine:
environment:
PATH: "$HOME/.asdf/bin:$HOME/.asdf/shims:$PATH"
services:
- redis
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
- asdf install
override:
- yes | mix deps.get
- yes | mix local.rebar
database:
override:
- mix ecto.create
- mix ecto.migrate
test:
override:
- mix test
- mix credo --strict
- mv ./_build/test/lib/PROJECT_DIR_NAME/test-junit-report.xml $CIRCLE_TEST_REPORTS/junit.xml
# For JUnit output Circle can read
# Also add to mix.exs:
# {:junit_formatter, "~> 1.1", only: :test}
ExUnit.configure formatters: [JUnitFormatter, ExUnit.CLIFormatter]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment