Skip to content
Snippets Groups Projects
.gitlab-ci.yml 6.20 KiB
stages:
  - style
  - build
  - test
  - deploy


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


# style
check_style:
  stage: style
  image: docker-registry.esrf.fr/dau/est:python3.7_stretch_pyqt5_gtk3_wxpython
  before_script:
    - pip install black  
  script:
    # run black
    - LC_ALL=C.UTF-8 black --check --safe .


# build
doc:
  stage: build
  image: docker-registry.esrf.fr/dau/tomwer:python3.8_buster_pyqt5_sphinx
  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 -r requirements.txt
    - python -m pip install -r requirements-doc.txt
    - python -m pip install jupyterlab
    - python -m pip install pymca --upgrade --pre
    - python -m pip install xraylarch
    - rm -rf artifacts
    - mkdir artifacts
  script:
    - python setup.py build
    - python -m pip install .
    - python setup.py build_sphinx
    - mv build/sphinx/html artifacts/doc
  artifacts:
    paths:
      - artifacts/doc/
    when: on_success
    expire_in: 2h
  only:
    - master


# test
.build_template: &test_linux_template_pymca
  stage: test
  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 EST_TEST_PROCESS=False
    - python --version
    - python -m pip install pip --upgrade
    - python -m pip install setuptools --upgrade
    - python -m pip install numpy --upgrade