image: node:6.9.4

pipelines:

  default:
    - step:
        caches:
          - node
        script:
          - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 0.18.1
          - export PATH=$HOME/.yarn/bin:$PATH
          - yarn
          - npm run cover

  tags:
    '*':
      - step:
          caches:
            - node
          script:
            - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 0.18.1
            - export PATH=$HOME/.yarn/bin:$PATH
            - yarn
            - npm run cover

  branches:
    develop:
      - step:
          caches:
            - node
          script:
            - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 0.18.1
            - export PATH=$HOME/.yarn/bin:$PATH
            - yarn
            - npm run cover

options:
  docker: true