image: node

before_script:
  - npm prune
  - npm install

stages:
 - test
 - doc

"Run tests":
  stage: test
  script:
    - NODE_ENV=ci npm run ci
  cache:
    key: "$CI_BUILD_REF_NAME"
    paths:
      - 'node_modules/'
  artifacts:
    reports:
      junit: junit.xml

pages:
  stage: doc
  script:
    - npm run doc
  artifacts:
    paths:
      - public
  only:
    - master



