image: node:current-alpine

stages:
  - test
  - publish

code quality:
  stage: test
  script:
    - npm ci
    - npm i --no-save @vuedoc/parser
    - npm run lint

npm outdated:
  stage: test
  script:
    - npm ci
    - npm outdated
  allow_failure: true

security scan:
  stage: test
  script:
    - npm audit --production

test & coverage:
  stage: test
  script:
    - npm ci
    - npm i --no-save @vuedoc/parser
    - npm test
  coverage: '/All files[^|]*\|[^|]*\s+([\d\.]+)/'
  artifacts:
    paths:
      - coverage/

coverage report:
  stage: publish
  dependencies:
    - test & coverage
  script:
    - mv coverage/lcov-report/ public/
  artifacts:
    paths:
      - public
  only:
    - master
  environment:
    name: coverage report
    url: https://vuedoc.gitlab.io/md

package:
  stage: publish
  script:
    - npm pack
  artifacts:
    paths:
      - ./*.tgz

publish:
  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/@vuedoc/md

image: node:current-alpine

stages:
  - test
  - publish

code quality:
  stage: test
  script:
    - npm ci
    - npm i --no-save git://@gitlab.com:vuedoc/parser.git#dev
    - npm run lint

npm outdated:
  stage: test
  script:
    - npm ci
    - npm outdated
  allow_failure: true

security scan:
  stage: test
  script:
    - npm audit --production

test & coverage:
  stage: test
  script:
    - npm ci
    - npm i --no-save git://@gitlab.com:vuedoc/parser.git#dev
    - npm test
  coverage: '/All files[^|]*\|[^|]*\s+([\d\.]+)/'
  artifacts:
    paths:
      - coverage/

coverage report:
  stage: publish
  dependencies:
    - test & coverage
  script:
    - mv coverage/lcov-report/ public/
  artifacts:
    paths:
      - public
  only:
    - master
  environment:
    name: coverage report
    url: https://vuedoc.gitlab.io/md

package:
  stage: publish
  script:
    - npm pack
  artifacts:
    paths:
      - ./*.tgz

publish:
  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/@vuedoc/md

Use the dev version of Vuedoc Parser
Use the dev version of Vuedoc Parser
