Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (33 sloc) 1.02 KB
# Elixir CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-elixir/ for more details
version: 2
jobs:
build:
docker:
# specify the version here
- image: circleci/elixir:1.4
- image: postgres:9.5
env:
- POSTGRES_PASSWORD=test
- POSTGRES_USER=test
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/postgres:9.4
working_directory: ~/repo
steps:
- checkout
# specify any bash command here prefixed with `run: `
- run: mix local.rebar --force
- run: mix local.hex --force
- run: mix deps.get
- run: mix ecto.create
- run: mix test
- run: |
set -exu
if [ $CIRCLE_BRANCH == "master" ]; then
BRANCH=master TARGET_SERVER=production bin/deploy
else
echo "Not on master branch, nothing to do"
fi