Skip to content
Snippets Groups Projects
Commit 50481c8e authored by Olivier Bertrand's avatar Olivier Bertrand
Browse files

Update CI/CD

parent e185e6de
No related branches found
No related tags found
No related merge requests found
# 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
- coverage
- doc_build
navipy_install:
stage: build
before_script:
- python3 -V # Print out python version for debugging
script:
- pip3 install virtualenv
- virtualenv venv
- source venv/bin/activate
- python3 setup.py bdist_wheel
artifacts:
paths:
- venv
flake8:
stage: test
dependencies:
- navipy_install
script:
- pip3 install --user tox flake8
- source $CI_PROJECT_DIR/venv/bin/activate
- python3 -m flake8 navipy/*.py
navipy_unittest:
stage: test
dependencies:
- navipy_install
script:
- source $CI_PROJECT_DIR/venv/bin/activate
- python3 -m coverage run -m unittest discover navipy
artifacts:
paths:
- .coverage
coverage:
stage: coverage
dependencies:
- navipy_install
- navipy_unittest
script:
- pip3 install --user networkx
- python3 -m unittest discover navipy
- source $CI_PROJECT_DIR/venv/bin/activate
- python3 -m coverage html
artifacts:
paths:
- coverage_html_report
expire_in: 1 day
doc_build:
stage: deploy
stage: doc_build
dependencies:
- navipy_install
- coverage
script:
- pip3 install --user sphinx sphinx-rtd-theme
- source $CI_PROJECT_DIR/venv/bin/activate
- pip3 install --user sphinx sphinx_rtd_theme
- cd doc ; make html
- mv build/html/ ../public/
artifacts:
paths:
- public
only:
- master
- doc/build
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment