general:
  artifacts:
    - "coverage"
    - "emulator.out"

machine:
  environment:
    PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin"
  node:
    version: 6.10.2
  post:
    - sudo /opt/google-cloud-sdk/bin/gcloud -q components install beta
    - sudo /opt/google-cloud-sdk/bin/gcloud config set project $GCLOUD_PROJECT
    - sudo /opt/google-cloud-sdk/bin/gcloud -q beta emulators datastore start --no-legacy >> emulator.out 2>&1 &:
      background: true
    - curl --retry 10 --retry-delay 2 -v http://localhost:8081 # make sure the Datastore emulator is ready

dependencies:
  override:
    - yarn
  cache_directories:
    - ~/.cache/yarn

test:
  override:
    - yarn validate
general:
  artifacts:
    - "coverage"
    - "emulator.out"

machine:
  environment:
    PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin"
  node:
    version: 6.10.2
  post:
    - sudo /opt/google-cloud-sdk/bin/gcloud -q components install beta
    - sudo /opt/google-cloud-sdk/bin/gcloud config set project $GCLOUD_PROJECT

dependencies:
  override:
    - yarn
  cache_directories:
    - ~/.cache/yarn

test:
  pre:
    - sudo /opt/google-cloud-sdk/bin/gcloud -q beta emulators datastore start --no-legacy >> emulator.out 2>&1:
        background: true
    - curl --retry 10 --retry-delay 2 -v http://localhost:8081 # make sure the Datastore emulator is ready
  override:
    - yarn validate
Move background process to test step
[CI] Move background process to test step
