From 5ada981440ca4424d7ebafb9805820bbc514e983 Mon Sep 17 00:00:00 2001
From: Jan Caron <j.caron@fz-juelich.de>
Date: Fri, 21 Jul 2017 09:33:33 +0200
Subject: [PATCH] Trying several test in gitlab-ci.yml on miniconda3 docker
 image.

---
 .gitlab-ci.yml | 57 ++++++++++++++++++++++++++++++++++++++++++--------
 setup.py       |  4 ++--
 2 files changed, 50 insertions(+), 11 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c382b08..4da5d4c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -15,19 +15,11 @@ before_script:
   - echo iffgit.fz-juelich.de,134.94.161.83 "$ID_RSA_IFFGIT_PUBLIC" > ~/.ssh/known_hosts
   # Provide read access to owner (octal value code: 400) to known_hosts with chmod:
   - chmod 400 ~/.ssh/known_hosts
-  #
-  - ls
-  - conda info --envs
-  - conda env create -q  # -q: quiet/ no progressbar, because it spams the log!
-  - source activate pyramid
-  - conda info --envs
-  # Install jutil via secure ssh connection:
-  - pip install git+ssh://gitlab@iffgit.fz-juelich.de/unger/jutil.git
 
 stages:
   - test
 
-test:
+test_pip_minimal:
   stage: test
   script:
     # TODO: Different jobs with custom develop arguments? extra_requires (hyperspy, plotting)?
@@ -35,8 +27,55 @@ test:
     # Install requirements:
 #    # - pip install -r requirements.txt  # TODO: DOES NOT WORK (because mayavi and stuff...)
     - pip install -e .['tests']
+    # Install jutil via secure ssh connection:
+    - pip install git+ssh://gitlab@iffgit.fz-juelich.de/unger/jutil.git
+    # Execute tests:
     - python setup.py test
+    # Create coverage report:
     - coverage html
   artifacts:
     paths:
       - htmlcov/
+
+test_pip_full:
+  stage: test
+  script:
+    # Install requirements:
+    - pip install -e .['all']
+    # Install jutil via secure ssh connection:
+    - pip install git+ssh://gitlab@iffgit.fz-juelich.de/unger/jutil.git
+    # Execute tests:
+    - python setup.py test
+
+test_pip_requirements:
+  stage: test
+  script:
+    - pip install numpy  # Needed for mayavi...
+    # Install requirements:
+    - pip install -r requirements.txt  # TODO: DOES NOT WORK (because mayavi and stuff...)
+    # Install jutil via secure ssh connection:
+    - pip install git+ssh://gitlab@iffgit.fz-juelich.de/unger/jutil.git
+    # Execute tests:
+    - python setup.py test
+
+test_conda:
+  stage: test
+  script:
+    # Install requirements:
+    - conda info --envs
+    - conda env create -q  # -q: quiet/ no progressbar, because it spams the log!
+    - source activate pyramid
+    - conda info --envs
+    # Install jutil via secure ssh connection:
+    - pip install git+ssh://gitlab@iffgit.fz-juelich.de/unger/jutil.git
+    # Execute tests:
+    - python setup.py test
+
+
+
+
+
+
+
+
+
diff --git a/setup.py b/setup.py
index d255b81..c8b78df 100644
--- a/setup.py
+++ b/setup.py
@@ -150,8 +150,8 @@ extras_require["all"] = list(itertools.chain(*list(extras_require.values())))
 
 
 print('\n-------------------------------------------------------------------------------')
-print('checking requirements')
-check_requirements()
+# print('checking requirements')  # TODO: Get rid of!
+# check_requirements()
 print('write version.py')
 write_version_py()
 setup(name=DISTNAME,
-- 
GitLab