# Javascript Node CircleCI 2.0 configuration file
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
version: 2
jobs:
  build:
    machine:
      image: circleci/classic:latest
      docker_layer_caching: true
    working_directory: ~/crypto-rpc
    steps:
      - checkout
      - run:
          name: Smoke test
          command: |
            export NVM_DIR="/opt/circleci/.nvm"
            [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
            nvm install 8
            nvm alias default 8
            npm install
            npm run test:bats
      - run:
          name: Build service
          command: npm test
