From fe067b8a241a800b7d8d171512074ef144dbea61 Mon Sep 17 00:00:00 2001 From: Lou G <lou.grunner@hotmail.fr> Date: Mon, 9 Mar 2020 12:56:48 +0100 Subject: [PATCH 1/3] Add test to the pipeline --- .gitlab-ci.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fd1e57b..50a6403 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,25 @@ image: node:latest stages: + - build + - test - production + +cache: + paths: + - node_modules/ + +installation: + stage: build + script: npm install + artifacts: + paths: + - node_modules/ + +testing: + stage: test + type: test + script: npm test production: type: deploy -- GitLab From 957cc32d898b74d9e0475ecacc78f62564356825 Mon Sep 17 00:00:00 2001 From: Lou G <lou.grunner@hotmail.fr> Date: Mon, 9 Mar 2020 13:03:00 +0100 Subject: [PATCH 2/3] Try fix test in pipeline --- .gitlab-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 50a6403..4931ceb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,7 +19,11 @@ installation: testing: stage: test type: test + before_script: + - npm start script: npm test + after_script: + - kill -9 $(ps aux | grep '\snode\s' | awk '{print $2}') production: type: deploy -- GitLab From 51e557622315a6a1914e95be09c2b24f2e0e4606 Mon Sep 17 00:00:00 2001 From: Lou G <lou.grunner@hotmail.fr> Date: Mon, 9 Mar 2020 13:10:43 +0100 Subject: [PATCH 3/3] Fix test pipeline --- .gitlab-ci.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4931ceb..50a6403 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,11 +19,7 @@ installation: testing: stage: test type: test - before_script: - - npm start script: npm test - after_script: - - kill -9 $(ps aux | grep '\snode\s' | awk '{print $2}') production: type: deploy -- GitLab