language: node_js
node_js:
  - 14
services:
  - docker
env:
  - DOCKER_COMPOSE_VERSION=1.24.1

before_install:
  - sudo rm /usr/local/bin/docker-compose
  - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
  - chmod +x docker-compose
  - sudo mv docker-compose /usr/local/bin
install:
  - npm install
  - npm run-script build
script:
  - cd pretest && docker-compose up -d && cd .. && sleep 10
  - npm test
  