image: node:latest

cache:
  paths:
    - node_modules/
    - docs/
    - dist/

stages:
  - build
  - test
  - publish

build:
  stage: build
  script:
    - npm audit
    - npm install --legacy-peer-deps
    - npm run build

#test:
#  stage: test
#  before_script:
#    - npm install -g jest
 # script:
#    - jest
#  artifacts:
#    paths:
##     - docs/coverage/lcov.info

publish:
  stage: publish
  script:
    - npm publish
