From cba5012db680bd16b967962f3106801c321c5c05 Mon Sep 17 00:00:00 2001
From: Perreal Guillaume <guillaume.perreal@irstea.fr>
Date: Fri, 20 Sep 2019 13:47:46 +0200
Subject: [PATCH] =?UTF-8?q?Ajout=20de=20la=20configuration=20d'int=C3=A9gr?=
 =?UTF-8?q?ation=20continue.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .gitlab-ci.yml | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 .gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..41716b6
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,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
-- 
GitLab