From 433764f535be018ecc57ba8cd4de1ab001ebf9ab Mon Sep 17 00:00:00 2001
From: Denis Arrivault <denis.arrivault@lif.univ-mrs.fr>
Date: Fri, 28 Apr 2017 16:06:15 +0200
Subject: [PATCH] Reorganisation of .gitlab-ci.yml with templates

---
 .gitlab-ci.yml | 43 +++++++++++++++++++++++++++++--------------
 1 file changed, 29 insertions(+), 14 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d221046..194d279 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,28 +1,43 @@
 # CI Config for ltaftpy / gitlab
 
-#On X86_64 ubuntu
-unbutu:X86_64:
-  image: registry.gitlab.lif.univ-mrs.fr:5005/dev/ltfatpy/ubuntu:X86_64
-  tags:
-    - docker
+# nosetests template
+.nose: &nose
   script:
     - pip3 install -e .
     - nosetests3
+  artifacts:
+    paths:
+      - build
+    expire_in: 8d
+
+# doc template
+.doc: &doc
+    - pip3 install -e .
     - python3 setup.py build_sphinx
     - cp -r build/sphinx/html public
-  artifacts:
+    artifacts:
     paths:
       - public
-      - build
 
-#On i686 ubuntu
+# Tests on X86_64 ubuntu
+unbutu:X86_64:
+  <<: *nose
+  image: registry.gitlab.lif.univ-mrs.fr:5005/dev/ltfatpy/ubuntu:X86_64
+  tags:
+    - docker
+
+# Tests on i686 ubuntu
 ubuntu:i686:
+  <<: *nose
   image: registry.gitlab.lif.univ-mrs.fr:5005/dev/ltfatpy/ubuntu:i686
   tags:
     - docker
-  script:
-    - pip3 install -e .
-    - nosetests3
-  artifacts:
-    paths:
-      - build
\ No newline at end of file
+
+# Doc Generation
+pages:
+  <<: *doc
+  image: registry.gitlab.lif.univ-mrs.fr:5005/dev/ltfatpy/ubuntu:X86_64
+  tags:
+    - docker
+  only:
+    - master
-- 
GitLab