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

Add coverage function [correct yaml]

parent 4bbd0f13
No related branches found
No related tags found
No related merge requests found
...@@ -11,10 +11,9 @@ stages: ...@@ -11,10 +11,9 @@ stages:
navipy_install: navipy_install:
stage: build stage: build
before_script: before_script:
- python3 -V # Print out python version for debugging - python3 -V # Print out python version for debugging
script: script:
- pip3 install virtualenv - pip3 install virtualenv
- virtualenv venv - virtualenv venv
...@@ -29,7 +28,7 @@ flake8: ...@@ -29,7 +28,7 @@ flake8:
stage: test stage: test
dependencies: dependencies:
- navipy_install - navipy_install
script: script:
- source $CI_PROJECT_DIR/venv/bin/activate - source $CI_PROJECT_DIR/venv/bin/activate
- python3 -m flake8 navipy/*.py - python3 -m flake8 navipy/*.py
...@@ -37,8 +36,8 @@ flake8: ...@@ -37,8 +36,8 @@ flake8:
navipy_unittest: navipy_unittest:
stage: test stage: test
dependencies: dependencies:
- navipy_install - navipy_install
script: script:
- source $CI_PROJECT_DIR/venv/bin/activate - source $CI_PROJECT_DIR/venv/bin/activate
- python3 -m coverage run -m unittest discover navipy - python3 -m coverage run -m unittest discover navipy
...@@ -46,21 +45,21 @@ navipy_unittest: ...@@ -46,21 +45,21 @@ navipy_unittest:
artifacts: artifacts:
paths: paths:
- .coverage - .coverage
coverage: coverage:
stage: coverage stage: coverage
dependencies: dependencies:
- navipy_install - navipy_install
- navipy_unittest - navipy_unittest
script: script:
- source $CI_PROJECT_DIR/venv/bin/activate - source $CI_PROJECT_DIR/venv/bin/activate
- python3 -m coverage html - python3 -m coverage html
artifacts: artifacts:
paths: paths:
- coverage_html_report - coverage_html_report
expire_in: 1 day expire_in: 1 day
doc_build: doc_build:
stage: doc_build stage: doc_build
...@@ -81,25 +80,25 @@ doc_build: ...@@ -81,25 +80,25 @@ doc_build:
pages: pages:
stage: deploy stage: deploy
before_script: before_script:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- 'which rsync || apt-get install rsync -y' - 'which rsync || apt-get install rsync -y'
- mkdir -p ~/.ssh - mkdir -p ~/.ssh
- eval $(ssh-agent -s) - eval $(ssh-agent -s)
- '[[ -f /.dockerenv ]] && echo -e "Host *ntStrictHostKeyChecking nonn" > ~/.ssh/config' - '[[ -f /.dockerenv ]] && echo -e "Host *ntStrictHostKeyChecking nonn" > ~/.ssh/config'
- ssh-add <(echo "$PRIVATE_KEY") - ssh-add <(echo "$PRIVATE_KEY")
script: script:
- ssh -p50022 bolirev@bioneuro77.biologie.uni-bielefeld.de "mkdir -p /fastdata/html/navipy/" - ssh -p50022 bolirev@bioneuro77.biologie.uni-bielefeld.de "mkdir -p /fastdata/html/navipy/"
- mkdir -p public/coverage - mkdir -p public/coverage
- cp -fr doc/build/html/* public/ - cp -fr doc/build/html/* public/
- cp -fr coverage_html_report/* public/coverage/ - cp -fr coverage_html_report/* public/coverage/
dependencies: dependencies:
- coverage - coverage
- doc_build - doc_build
artifacts: artifacts:
paths: paths:
- public - public
only: only:
- master - master
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