machine:
  node:
    version: 4.0.0
test:
  override:
    # Run lint
    - npm run lint
    # Run tests with coverage
    #- npm test --coverage -- -R spec-xunit-file
    # Extract test artifacts
    #- cp xunit.xml ${CIRCLE_TEST_REPORTS}/deployment:
deployment:
  production:
    branch: master
    commands:
      # Upload coverage data
      #- npm run coveralls
      # Push NPM package if not yet published
      - mv npmrc-env .npmrc
      - if [ $(npm show five-bells-visualization version) != $(npm ls --depth=-1 2>/dev/null | head -1 | cut -f 1 -d " " | cut -f 2 -d @) ] ; then npm publish ; fi
general:
  artifacts:
    - "coverage/lcov-report"
