From 24b6c3249905e07b4e6b96c51b87ed02d0a41c32 Mon Sep 17 00:00:00 2001 From: "Caron, Jan" <j.caron@fz-juelich.de> Date: Mon, 28 Oct 2019 13:30:54 +0100 Subject: [PATCH] Update .gitlab-ci.yml, only one test, shifting around of stuff, deploy token installation of jutil --- .gitlab-ci.yml | 80 +++++++++++--------------------------------------- 1 file changed, 17 insertions(+), 63 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fe58852..a2e8eca 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,36 +3,35 @@ stages: before_script: # Create SSH configuration directory if necessary (also parents with -p, mode: read/write/exec): - - mkdir -p --mode=700 ~/.ssh/ + #- mkdir -p --mode=700 ~/.ssh/ # Add SSH key for jutil: - - echo "$ID_RSA_JUTIL_PRIVATE" > ~/.ssh/id_rsa_jutil + #- echo "$ID_RSA_JUTIL_PRIVATE" > ~/.ssh/id_rsa_jutil # Configure SSH to use ~/.ssh/id_rsa_jutil for jugit.fz-juelich.de (-e allows \n): - - echo -e "Host jugit.fz-juelich.de\n\tIdentityFile ~/.ssh/id_rsa_jutil\n" > ~/.ssh/config + #- echo -e "Host jugit.fz-juelich.de\n\tIdentityFile ~/.ssh/id_rsa_jutil\n" > ~/.ssh/config # Add jugit.fz-juelich.de to known_hosts (not the same key as Jutil!): - - echo jugit.fz-juelich.de, 134.94.130.31 "$ID_RSA_JUTIL_PUBLIC" > ~/.ssh/known_hosts + #- echo jugit.fz-juelich.de, 134.94.130.31 "$ID_RSA_JUTIL_PUBLIC" > ~/.ssh/known_hosts # Provide read access to owner (octal value code: 400) to jutil key and known_hosts with chmod: - - chmod 400 ~/.ssh/id_rsa_jutil - - chmod 400 ~/.ssh/known_hosts + #- chmod 400 ~/.ssh/id_rsa_jutil + #- chmod 400 ~/.ssh/known_hosts # Install necessary apps like git and mesa-utils (needed for GL): # TODO: Check if this is still needed after removing mayavi!? - - apt-get update - - apt-get install -y curl bzip2 git mesa-utils - -test_miniconda: - stage: test - image: continuumio/miniconda3 - script: + #- apt-get update + #- apt-get install -y curl bzip2 git mesa-utils + # Install requirements for pyramid: - conda info --envs - conda env create -q # -q: quiet/ no progressbar, because it spams the log! - conda info --envs - source activate pyramid - conda info --envs - - conda uninstall mayavi vtk -y # TODO: necessary, because mayavi does not play nice with qt5! - - conda install pyqt=5 # TODO: This is needed for tests to run, but breaks mayavi (not used)! - # Install jutil via secure ssh connection: - - pip install git+ssh://gitlab@jugit.fz-juelich.de/unger/jutil.git - # Execute tests: + # Install jutil via deploy token access: + - echo bla"$TEST"bla + - pip install git+https://pyramid:fXciYhcXM6yVYqEFsxD6@jugit.fz-juelich.de/j.ungermann/jutil.git + +test_miniconda: + stage: test + image: continuumio/miniconda3 + script: - python setup.py test # Create coverage report: - coverage html @@ -40,51 +39,6 @@ test_miniconda: paths: - htmlcov/ -test_conda_ubuntu: - stage: test - image: ubuntu:16.04 - script: - # Install miniconda: - - curl -O -L https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh - - chmod +x Miniconda3-latest-Linux-x86_64.sh - - ./Miniconda3-latest-Linux-x86_64.sh -b -p /opt/miniconda3 - - export PATH="/opt/miniconda3/bin:${PATH}" - # Install requirements for pyramid: - - conda info --envs - - conda env create -q # -q: quiet/ no progressbar, because it spams the log! - - conda info --envs - - source activate pyramid - - conda info --envs - - conda uninstall mayavi vtk -y # TODO: necessary, because mayavi does not play nice with qt5! - - conda install pyqt=5 # TODO: This is needed for tests to run, but breaks mayavi (not used)! - # Install jutil via secure ssh connection: - - pip install git+ssh://git@jugit.fz-juelich.de:j.ungermann/jutil.git - # Execute tests: - - python setup.py test - -test_pip_minimal: - stage: test - image: python:3.6 - script: - # TODO: Different jobs with custom develop arguments? extra_requires (hyperspy, plotting)? - # TODO: Use pip install -e .[hyperspy], etc. - # Install requirements: - - pip install -e .['tests'] # TODO: other case with ['all']? After getting rid of mayavi... - # Install jutil via secure ssh connection: - - pip install git+ssh://git@jugit.fz-juelich.de:j.ungermann/jutil.git - # Execute tests: - - python setup.py test - -test_pip_requirements: - stage: test - image: python:3.6 - script: - # Install requirements: - - pip install -r requirements.txt # TODO: mayavi/pyfftw commented out by hand to make work! - # Install jutil via secure ssh connection: - - pip install git+ssh://git@jugit.fz-juelich.de:j.ungermann/jutil.git - # Execute tests: - - python setup.py test # TODO: What about windows? Better have one test (miniconda?) for windows/max/linux, each! # TODO: Or use Dockers? What's the difference -- GitLab