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

WOrk on gitlab-ci

I can not manage to make a correct use of artifact/cach
I want to reuse files from one to the next...
parent 7e31d676
No related branches found
No related tags found
No related merge requests found
......@@ -2,37 +2,52 @@
# 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
- doc_build
- deploy
navipy_install:
stage: build
before_script:
- python3 -V # Print out python version for debugging
artifacts:
paths:
- venv
script:
- pip3 install virtualenv
- virtualenv venv
- source venv/bin/activate
- python3 setup.py bdist_wheel
flake8:
stage: test
before_script:
- ls -l
- source venv/bin/activate
script:
- pip3 install --user tox flake8
- pip3 install tox flake8
- python3 -m flake8 navipy/*.py
navipy_unittest:
stage: test
dependencies:
- navipy_install
before_script:
- ls -l $CI_PROJECT_DIR
script:
- pip3 install --user networkx
- ls -l $CI_PROJECT_DIR
- source $CI_PROJECT_DIR/venv/bin/activate
- python3 -m unittest discover navipy
coverage:
stage: test
script:
- nosetests -c .noserc -q --cover-html-dir=build --cover-html
- pip3 install --user nose
- python3 -m nose -c .noserc -q --cover-html-dir=build --cover-html
- coverage report -m
coverage: '/TOTAL.+ ([0-9]{1,3}%)/'
artifacts:
......@@ -45,9 +60,9 @@ doc_build:
before_script:
- 'true'
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
dependencies:
- sphinx
artifacts:
paths:
- build
......@@ -64,6 +79,7 @@ pages:
- ssh-add <(echo "$PRIVATE_KEY")
script:
- ssh -p50022 bolirev@bioneuro77.biologie.uni-bielefeld.de "mkdir -p /fastdata/html/navipy/"
- mkdir -p public/coverage
- cp -fr docs/build/html/* public/
- cp -fr build/* public/coverage/
......
......@@ -24,4 +24,9 @@ In the interest of fostering an open and welcoming environment, we as students a
1. solve problems with CI/CD pipelines for contineous integration
2. add tutorials
3. comment test function -> add to doc
\ No newline at end of file
3. comment test function -> add to doc
# Useful links
## for testing gitlab-ci locally
https://substrakt.com/how-to-debug-gitlab-ci-builds-locally/
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