.gitlab-ci.yml 1.86 KB
Newer Older
Daniel Scheffler's avatar
Daniel Scheffler committed
1
2
before_script:
  - git lfs pull
3
4
5
6
  # update sicor
  - source /root/anaconda3/bin/activate
  - export GDAL_DATA=/root/anaconda3/share/gdal
  - export PYTHONPATH=$PYTHONPATH:/root  # /root <- directory needed later
Daniel Scheffler's avatar
Fix.    
Daniel Scheffler committed
7
  - conda install -y -q -c conda-forge basemap
8
9
10
11
  - rm -rf context/sicor
  - git clone https://gitext.gfz-potsdam.de/EnMAP/sicor.git ./context/sicor
  - cd ./context/sicor
  - python setup.py install
Daniel Scheffler's avatar
Fix.    
Daniel Scheffler committed
12
  - cd ../../
Daniel Scheffler's avatar
Daniel Scheffler committed
13

14
15
16
17
18
19

stages:
    - test
    - deploy


20
test_gms_preprocessing:
21
  stage: test
Daniel Scheffler's avatar
Daniel Scheffler committed
22
23
24
25
  script:
    - source /root/anaconda3/bin/activate
    - export GDAL_DATA=/root/anaconda3/share/gdal
    - export PYTHONPATH=$PYTHONPATH:/root  # /root <- directory needed later
26
    - pip install rednose  # TODO remove as soon as docker container is rebuilt
27
    - make nosetests
Daniel Scheffler's avatar
Daniel Scheffler committed
28
29
30
31
32
    - make docs
  artifacts:
    paths:
    - htmlcov/
    - docs/_build/html/
33
34
    - nosetests.html
    - nosetests.xml
35
    when: always
Daniel Scheffler's avatar
Daniel Scheffler committed
36

37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54

test_styles:
  stage: test
  script:
    - source /root/anaconda3/bin/activate
    - export GDAL_DATA=/root/anaconda3/share/gdal
    - export PYTHONPATH=$PYTHONPATH:/root  # /root <- directory needed later
    - pip install flake8 pycodestyle pylint pydocstyle  # TODO remove as soon as docker container is rebuilt
    - make lint
  artifacts:
    paths:
    - tests/linting/flake8.log
    - tests/linting/pycodestyle.log
    - tests/linting/pydocstyle.log
    when: always


deploy_pages:
Daniel Scheffler's avatar
Daniel Scheffler committed
55
56
  stage: deploy
  dependencies:
57
    - test_gms_preprocessing
Daniel Scheffler's avatar
Daniel Scheffler committed
58
59
60
  script:
    - mkdir -p public/coverage
    - cp -r htmlcov/* public/coverage/
Daniel Scheffler's avatar
Daniel Scheffler committed
61
    - mkdir -p public/nosetests_reports
62
    - cp nosetests.* public/nosetests_reports/
Daniel Scheffler's avatar
Daniel Scheffler committed
63
64
65
66
67
68
    - mkdir -p public/doc
    - cp -r docs/_build/html/* public/doc/
  artifacts:
    paths:
      - public
    expire_in: 30 days
69
70
71
  environment:
    name: production/pages
    url: http://geomultisens.gitext.gfz-potsdam.de/gms_preprocessing/
Daniel Scheffler's avatar
Daniel Scheffler committed
72
73
  only:
    - master