visua-vue/.gitlab-ci.yml
2025-07-29 11:37:02 +02:00

36 lines
866 B
YAML

default:
image: node:latest
stages:
- test
- deploy
cache:
paths:
- node_modules/
before_script:
- echo "@cellule-financiere-pmo:registry=https://gitlab.com/api/v4/projects/71709281/packages/npm/" > .npmrc
- echo "//gitlab.com/api/v4/projects/71709281/packages/npm/:username=${DEPLOY_USER}" >> .npmrc
- echo "//gitlab.com/api/v4/projects/71709281/packages/npm/:_password=$(echo -n ${DEPLOY_TOKEN} | base64)" >> .npmrc
- echo "//gitlab.com/api/v4/projects/71709281/packages/npm/:email=ci@example.com" >> .npmrc
- echo "//gitlab.com/api/v4/projects/71709281/packages/npm/:always-auth=true" >> .npmrc
- npm ci
unit-tests:
stage: test
script:
- npm run test:unit
artifacts:
paths:
- coverage/
expire_in: 1 month
only:
- merge_requests
publish-npm:
stage: deploy
script:
- npm publish
only:
- tags