.gitlab-ci.yml 1.75 KB
Newer Older
Daniel Scheffler's avatar
Daniel Scheffler committed
1
2
3
before_script:
  - git lfs pull

4
5
6
7
8
9

stages:
    - test
    - deploy


10
test_gms_preprocessing:
11
  stage: test
Daniel Scheffler's avatar
Daniel Scheffler committed
12
  script:
Daniel Scheffler's avatar
Daniel Scheffler committed
13
    # update sicor
Daniel Scheffler's avatar
Daniel Scheffler committed
14
15
16
    - source /root/anaconda3/bin/activate
    - export GDAL_DATA=/root/anaconda3/share/gdal
    - export PYTHONPATH=$PYTHONPATH:/root  # /root <- directory needed later
Daniel Scheffler's avatar
Daniel Scheffler committed
17
18
19
20
    - conda install -y -q -c conda-forge basemap
    - rm -rf context/sicor
    - git clone https://gitext.gfz-potsdam.de/EnMAP/sicor.git ./context/sicor
    - cd ./context/sicor
21
    - make download-tables
Daniel Scheffler's avatar
Daniel Scheffler committed
22
23
24
    - python setup.py install
    - cd ../../
    # make tests
25
    - pip install rednose  # TODO remove as soon as docker container is rebuilt
26
    - make nosetests
Daniel Scheffler's avatar
Daniel Scheffler committed
27
28
29
30
31
    - make docs
  artifacts:
    paths:
    - htmlcov/
    - docs/_build/html/
32
33
    - nosetests.html
    - nosetests.xml
34
    when: always
Daniel Scheffler's avatar
Daniel Scheffler committed
35

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

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