before_script:
  - apt-get update -qq && apt-get install -y -qq graphicsmagick wget sudo
  - wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash
  - export NVM_DIR="$HOME/.nvm"
  - . "$NVM_DIR/nvm.sh"

stages:
- test

test_node4:
  stage: test
  script:
    - nvm install 4
    - npm install
    - npm run test
    - npm run test:root && npm run test:install
    - npm run test:coverage

test_node5:
  stage: test
  script:
    - nvm install 5
    - npm install
    - npm run test
    - npm run test:install
    - npm run test:coverage

test_node6:
  stage: test
  script:
    - nvm install 6
    - npm install
    - npm run test
    - npm run test:install
    - npm run test:coverage

test_node7:
  stage: test
  script:
    - nvm install 7
    - npm install
    - npm run test
    - npm run test:install
    - npm run test:coverage

test_node8:
  stage: test
  script:
    - nvm install 8
    - npm install
    - npm run test
    - npm run test:install
    - npm run test:coverage
