.gitlab-ci.yml 2.96 KB
Newer Older
payno's avatar
payno committed
1
stages:
2
  - build
payno's avatar
payno committed
3
4
  - test_library
  - test_notbooks
5
  - deploy
payno's avatar
payno committed
6
7
8
9
10
11
12

variables:
  http_proxy: http://proxy.esrf.fr:3128
  https_proxy: http://proxy.esrf.fr:3128
  no_proxy: .esrf.fr,localhost
  ORANGE_WEB_LOG: 'False'

13
14
15
16
17
18
19
20
21
22
23
24
25
# build
doc:
  stage: build
  image: python:3.7-buster
  tags:
    - linux
  before_script:
    - arch
    - which python
    - python --version
    - python -m pip install pip --upgrade
    - python -m pip install setuptools --upgrade
    - python -m pip install sphinx
payno's avatar
payno committed
26
    - python -m pip install nbsphinx
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
    - python -m pip install -r requirements.txt
    - rm -rf artifacts
    - mkdir artifacts
  script:
    - python setup.py build
    - python setup.py build_sphinx
    - mv build/sphinx/html artifacts/doc
  artifacts:
    paths:
      - artifacts/doc/
    when: on_success
    expire_in: 2h
  only:
    - master

payno's avatar
payno committed
42

43
# test_library
payno's avatar
payno committed
44
45
46
47
48
49
50
51
52
53
54
.build_template: &test_linux_template
  stage: test_library
  before_script:
    - arch
    - export PYTHONPATH="${PYTHONPATH}:/usr/lib/python3/dist-packages/"
    - export LD_LIBRARY_PATH=/lib/i386-linux-gnu/:${LD_LIBRARY_PATH}
    - export LD_LIBRARY_PATH=/lib/x86_64-linux-gnu/:${LD_LIBRARY_PATH}
    - export ORANGE_WEB_LOG='False'
    - python --version
    - python -m pip install pip --upgrade
    - python -m pip install setuptools --upgrade
payno's avatar
payno committed
55
    - python -m pip install -r requirements.txt
payno's avatar
payno committed
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
    - python -m pip install .
  script:
    - python -m unittest tomoscan.test.suite -v


test:python3.5-stretch-pyqt5:
  image: docker-registry.esrf.fr/dau/tomwer:python3.5_stretch_pyqt5
  <<: *test_linux_template


test:python3.7_stretch_pyqt5:
  image: docker-registry.esrf.fr/dau/tomwer:python3.7_stretch_pyqt5
  <<: *test_linux_template


71
# test_notbooks
payno's avatar
payno committed
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
test:test-tomoscan-tutorials:
  stage: test_notbooks
  image: docker-registry.esrf.fr/dau/tomwer:python3.7_buster_pyqt5
  before_script:
    - arch
    - export PYTHONPATH="${PYTHONPATH}:/usr/lib/python3/dist-packages/"
    - export LD_LIBRARY_PATH=/lib/i386-linux-gnu/:${LD_LIBRARY_PATH}
    - export LD_LIBRARY_PATH=/lib/x86_64-linux-gnu/:${LD_LIBRARY_PATH}
    - export ORANGE_WEB_LOG='False'
    - python --version
    - python -m pip install pip --upgrade
    - python -m pip install setuptools --upgrade
    - python -m pip install numpy --upgrade
    - python -m pip install matplotlib
    - python -m pip install jupyter_client
    - python -m pip install nbconvert
    - python -m pip install ipykernel
payno's avatar
payno committed
89
    - python -m pip install -r requirements.txt
payno's avatar
payno committed
90
91
92
93
    - python -m pip install fabio --upgrade --pre
    - python -m pip install silx --upgrade --pre
    - python -m pip install .
  script:
payno's avatar
payno committed
94
95
    - jupyter nbconvert --to notebook --execute doc/tutorials/edf_scan.ipynb
    - jupyter nbconvert --to notebook --execute doc/tutorials/hdf5_scan.ipynb
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115


# deploy
pages:
  stage: deploy
  tags:
    - linux
  image: python:3.7-buster
  script:
    - rm -rf public
    # doc
    - mv artifacts/doc public
  after_script:
    - ls -Rl public
  artifacts:
    paths:
      - public
    expire_in: 1h
  only:
    - master