# 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.5

      # 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
        environment:
          POSTGRES_USER: ubuntu

    working_directory: ~/api
    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 coveralls.circle

      - store_artifacts:
          path: /cover

# 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.5

      # 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
        environment:
          POSTGRES_USER: ubuntu

    working_directory: ~/api
    steps:
      - checkout

      - restore_cache:
          keys:
            - v1-dependency-cache-{{ checksum "mix.lock" }}
            - v1-dependency-cache
      - run: mix local.hex --force
      - run: mix local.rebar --force
      - run: mix deps.get
      - run: mix deps.compile
      - run: mix compile
      - run:
          command: mix compile
          environment:
            MIX_ENV: test
      - run: mix coveralls.circle
      - save_cache:
          key: v1-dependency-cache-{{ checksum "mix.lock" }}
          paths:
            - _build
            - deps
            - ~/.mix

Remove artifact storing and add cache
Remove artifact storing and add cache
