# run the test suite
tests:
    image: registry.gitlab.lis-lab.fr:5005/dev/scikit-multimodallearn/ubuntu:22.04
    tags:
        - docker
    script:
        - python3 setup.py install
        - pytest-3
    coverage: '/^TOTAL.+?(\d+\%)$/'
    artifacts:
      paths:
        - htmlcov/

# generate the documentation
doc:
    image: registry.gitlab.lis-lab.fr:5005/dev/scikit-multimodallearn/ubuntu:22.04
    tags:
        - docker
    only:
        - master
    script:
        - export LC_ALL=$(locale -a | grep en_US)
        - export LANG=$(locale -a | grep en_US)
        - pip3 install -e .[doc]
        - python3 setup.py build_sphinx
    artifacts:
        paths:
          - public

#        - python3 setup.py build_sphinx

# project public
#
pages:
    image: registry.gitlab.lis-lab.fr:5005/dev/scikit-multimodallearn/ubuntu:22.04
    tags:
        - docker
    only:
        - master
    script:
        - export LC_ALL=$(locale -a | grep en_US)
        - export LANG=$(locale -a | grep en_US)
        - pip3 install -e .[doc]
        - python3 setup.py build_sphinx
        - cp -r build/sphinx/html public
    artifacts:
        paths:
          - public