version: 2
jobs:
  build:
    docker:
      - image: circleci/node:6.10
    steps:
      - checkout
      - run:
          name: Install docker-compose
          command: |
            set -x
            curl -L https://github.com/docker/compose/releases/download/1.16.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
            chmod +x /usr/local/bin/docker-compose
      - setup_remote_docker
      - restore_cache:
          key: dependency-cache-{{ .Branch }}-{{ checksum "package.json" }}
      - run:
          name: npm install
          command: npm install
      - save_cache:
          key: dependency-cache-{{ .Branch }}-{{ checksum "package.json" }}
          paths:
            - ./node_modules
      - run:
          name: testrpc
          command: npm run testrpc
          background: true
      - run:
          name: compile
          command: npm run compile
      - run:
          name: lint
          command: npm run lint
      - run:
          name: unit tests
          command: npm run unit-test -- --network=development
      - run:
          name: testrpc integration tests
          command: npm run integration-test -- --network=development
      - run:
          name: geth and parity integration tests
          command: bash run_integration_tests.sh

version: 2
jobs:
  build:
    docker:
      - image: circleci/node:6.10
    steps:
      - checkout
      - run:
          name: Install docker-compose
          command: |
            set -x
            curl -L https://github.com/docker/compose/releases/download/1.16.1/docker-compose-`uname -s`-`uname -m` > ~/docker-compose
            chmod +x ~/docker-compose
            sudo mv ~/docker-compose /usr/local/bin/docker-compose
      - setup_remote_docker
      - restore_cache:
          key: dependency-cache-{{ .Branch }}-{{ checksum "package.json" }}
      - run:
          name: npm install
          command: npm install
      - save_cache:
          key: dependency-cache-{{ .Branch }}-{{ checksum "package.json" }}
          paths:
            - ./node_modules
      - run:
          name: testrpc
          command: npm run testrpc
          background: true
      - run:
          name: compile
          command: npm run compile
      - run:
          name: lint
          command: npm run lint
      - run:
          name: unit tests
          command: npm run unit-test -- --network=development
      - run:
          name: testrpc integration tests
          command: npm run integration-test -- --network=development
      - run:
          name: geth and parity integration tests
          command: bash run_integration_tests.sh

Fix for permission issue when installing docker-compose in CircleCI
Fix for permission issue when installing docker-compose in CircleCI
