machine:
  node:
    version: 7.6
  services:
    - redis
  environment:
    ENVIRONMENT: test
    PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin"
    SECRET_KEY: F0E5AD933D7F6FD8F4DBB3E038C501C052DC0593C686D21ACB30AE205D2F634B
    DATABASE_URL_TEST: postgres://ubuntu@localhost:5432/circle_test
    DATABASE_URL: postgres://ubuntu@localhost:5432/circle_test
    URL: http://localhost:3000
    SMTP_FROM_EMAIL: hello@example.com

dependencies:
  override:
    - yarn install --pure-lockfile
  cache_directories:
    - ~/.cache/yarn

test:
  pre:
    - sequelize db:migrate --url postgres://ubuntu@localhost:5432/circle_test
  override:
    - yarn test
    - yarn lint
