# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/node/tags/
image: node:10


# This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache:
  paths:
    - node_modules/

before_script:
 - npm install

stages:
 - build
 - publish

build:lint:
  stage: build
  script:
    - npm run lint

build:test:
  stage: build
  script:
    - npm test

publish:
  stage: publish
  script:
    - echo '//registry.npmjs.org/:_authToken='$NPM_TOKEN > ~/.npmrc
    - npm run build
    - npm publish