diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6bc4541d04841655f56fd204e40bf02554779a01..de7383d4543bd12ab46f109e42451aedc1a67d11 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -57,7 +57,10 @@ build documentation: run tests: stage: test script: - - py.test --cov=kwant --flakes kwant + - py.test --cov=kwant --cov-report term --cov-report html --flakes kwant + artifacts: + paths: + - htmlcov check for broken links in doc: stage: test @@ -65,6 +68,22 @@ check for broken links in doc: - make -C doc linkcheck allow_failure: true + +upload coverage: + stage: deploy + only: + - branches@kwant/kwant + environment: + name: coverage/$CI_BUILD_REF_NAME + url: https://kwant-project.org/coverage/$CI_BUILD_REF_SLUG + before_script: + - mkdir -p ~/.ssh && ssh-keyscan kwant-project.org >> ~/.ssh/known_hosts + - echo $MASTER_WEBSITE_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa + script: + - rsync -rlv --delete htmlcov/* kwant@kwant-project.org:coverage/$CI_BUILD_REF_SLUG + after_script: + - rm -rf ~/.ssh + upload documentation to the test server: stage: deploy only: