os: linux
language: node_js

jobs:
  include:
    - stage: test
      node_js: '12'
      install:
        - npm install
      script:
        - npm run lint
        - npm run test
    - stage: npm release
      if: tag IS present
      node_js: '12'
      deploy:
        edge: true
        provider: npm
        email: '$NPM_EMAIL'
        api_key: '$NPM_TOKEN'
        on:
          tags: true
