-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
36 lines (34 loc) · 1.77 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
machine:
environment:
PATH: "$HOME/.asdf/bin:$HOME/.asdf/shims:$PATH"
node:
version: v6.1.0
services:
- redis
dependencies:
cache_directories:
- ~/.asdf
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
- yes | mix deps.get
- yes | mix local.rebar
- rm -rf ~/.global_elixir_deps
- mkdir -p ~/.global_elixir_deps
- if [ ! -d "~/.global_elixir_deps/bunt" ] ; then git clone https://github.com/rrrene/bunt ~/.global_elixir_deps/bunt && cp .tool-versions ~/.global_elixir_deps/bunt/ && cd ~/.global_elixir_deps/bunt && mix archive.build --force && mix archive.install --force && cd - ; fi
- if [ ! -d "~/.global_elixir_deps/credo" ] ; then git clone https://github.com/rrrene/credo ~/.global_elixir_deps/credo && cp .tool-versions ~/.global_elixir_deps/credo/ && cd ~/.global_elixir_deps/credo && mix deps.get && mix archive.build --force && mix archive.install --force && cd - ; fi
test:
override:
- PULL_REQUEST_ID=$CIRCLE_PR_NUMBER bundle exec pronto run -f github_status github_pr -c origin/master
- DOC=1 mix test
# Note that this presently only deploys updated documentation
deployment:
production:
branch: master
commands:
- ./bin/ops/deploy_api_documentation.sh
- "[[ ! -s \"$(git rev-parse --git-dir)/shallow\" ]] || git fetch --unshallow"
- git push git@heroku.com:american-phoenix-be-production.git $CIRCLE_SHA1:refs/heads/master
- heroku run mix ecto.migrate --app american-phoenix-be-production