Skip to content
Snippets Groups Projects
.gitlab-ci.yml 1.45 KiB
# This file is a template, and might need editing before it works on your project.
# This file is a template, and might need editing before it works on your project.
image: python:latest

before_script:
  - python3 -V                                   # Print out python version for debugging

stages:
  - build
  - test
  - deploy


navipy_install:
  stage: build
  script:
  - python3 setup.py bdist_wheel

flake8:
  stage: test
  script:
  - pip3 install --user tox flake8
  - python3 -m flake8 navipy/*.py
  
navipy_unittest:
  stage: test
  script:
  - pip3 install --user networkx
  - python3 -m unittest discover navipy

coverage:
    stage: test
    script:
        - nosetests -c .noserc -q --cover-html-dir=build --cover-html
        - coverage report -m
    coverage: '/TOTAL.+ ([0-9]{1,3}%)/'
    artifacts:
        paths:
            - build
        expire_in: 1 day

doc_build:
  stage: deploy
  before_script:
  - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
  - 'which rsync || apt-get install rsync -y'
  - mkdir -p ~/.ssh
  - eval $(ssh-agent -s)
  - '[[ -f /.dockerenv ]] && echo -e "Host *ntStrictHostKeyChecking nonn" > ~/.ssh/config'
  - ssh-add <(echo "$PRIVATE_KEY")
  
  script:
  - ssh -p50022 bolirev@bioneuro77.biologie.uni-bielefeld.de "mkdir -p /fastdata/html/navipy/"
  - pip3 install --user sphinx sphinx-rtd-theme
  - cd doc ; make html
  - ls build/html/
  artifacts:
    paths:
    - public
  only:
  - master