Commit 07efb75e authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

CI: utilisation de la configuration commune.

No related merge requests found
Showing with 4 additions and 68 deletions
+4 -68
stages:
- vendor
- test
- package
- publish
.node:
tags: [docker]
stage: test
image: node:10
dependencies: [node_modules]
variables:
NPM_CONFIG_CACHE: "$CI_PROJECT_DIR/.npm"
script:
- npm run "$CI_JOB_NAME"
node_modules:
extends: .node
stage: vendor
dependencies: []
script:
- npm install
artifacts:
name: $CI_JOB_NAME
expire_in: 1 day
paths:
- node_modules/
cache:
key: "$CI_COMMIT_REF_NAME-$CI_JOB_NAME"
paths:
- "$NPM_CONFIG_CACHE"
lint:
extends: .node
test:
extends: .node
before_script:
- apt-get update -yq
- apt-get install -yq --no-install-recommends xvfb firefox-esr xauth
script: xvfb-run npm run test
coverage: '/Lines.*:.*\d+\.\d+%/'
artifacts:
name: code-coverage
expire_in: 1 month
paths:
- coverage
package:
extends: .node
stage: package
artifacts:
name: package
expire_in: 1 day
paths:
- dist/
publish:
extends: .node
stage: publish
dependencies: [package]
only:
refs:
- tags
before_script:
- npm config set '//registry.npmjs.org/:_authToken' "$NPM_AUTH_TOKEN"
script:
- npm publish --access=public dist/ngx-debug
include:
- project: pole-is/tools/ci-config
ref: "1.5.0"
file: /ngx-library-ci.yml
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment