image: node:8.11.3

stages:
  - test
  - publish

test on nodejs lts 6:
  stage: test
  image: node:6.14.3
  script:
    - npm install
    - npm test
  coverage: '/All files[^|]*\|[^|]*\s+([\d\.]+)/'

test on nodejs lts 8:
  stage: test
  image: node:8.11.3
  script:
    - npm install
    - npm test
  coverage: '/All files[^|]*\|[^|]*\s+([\d\.]+)/'

publish to npm:
  stage: publish
  only:
    - tags
    - triggers
  script:
    - echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > .npmrc
    - npm publish
  environment:
    name: npm
    url: https://www.npmjs.com/package/image-downloader

image: node:8.11.3

stages:
  - test
  - publish

test on nodejs lts 6:
  stage: test
  image: node:6.14.3
  script:
    - npm install
    - npm test
  coverage: '/All files[^|]*\|[^|]*\s+([\d\.]+)/'

test on nodejs lts 8:
  stage: test
  image: node:8.11.3
  script:
    - npm install
    - npm test
  coverage: '/All files[^|]*\|[^|]*\s+([\d\.]+)/'

test on latest nodejs:
  stage: test
  image: node:latest
  script:
    - npm install
    - npm test
  coverage: '/All files[^|]*\|[^|]*\s+([\d\.]+)/'

publish to npm:
  stage: publish
  only:
    - tags
    - triggers
  script:
    - echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > .npmrc
    - npm publish
  environment:
    name: npm
    url: https://www.npmjs.com/package/image-downloader

Add test on latest nodejs
Add test on latest nodejs