diff -r 0037199881fb -r cf2304af0fab .gitlab-ci.yml --- a/.gitlab-ci.yml Wed Nov 20 19:26:23 2019 +0100 +++ b/.gitlab-ci.yml Fri Nov 22 18:51:37 2019 +0100 @@ -1,8 +1,9 @@ image: python:3.5 stages: - - build - test + - dist + - quality before_script: - export http_proxy=http://172.17.0.1:3128/ @@ -10,26 +11,44 @@ - export https_proxy=http://172.17.0.1:3128/ - export HTTPS_PROXY=http://172.17.0.1:3128/ -build: - stage: build +bootstrap: + stage: .pre script: - python3.5 bootstrap.py --buildout-version=2.12.0 - ./bin/buildout + +test: + stage: test + script: - ./bin/test +dist: + stage: dist + script: + - ./bin/buildout setup setup.py clean --all sdist bdist_egg bdist_wheel + artifacts: + paths: + - ./dist pylint: - stage: test + stage: quality allow_failure: true script: - - pip install pylint --quiet - - pylint src/pyams_utils/ + - pip install pylint-exit anybadge + - mkdir ./pylint + - ./bin/pylint src/pyams_utils/ | tee ./pylint/pylint.log || pylint-exit $? + - PYLINT_SCORE=$(sed -n 's/^Your code has been rated at \([-0-9.]*\)\/.*/\1/p' ./pylint/pylint.log) + - anybadge --label=Pylint --file=./pylint/pylint.svg --value=$PYLINT_SCORE 2=red 4=orange 8=yellow 10=green + - echo "Pylint score is $PYLINT_SCORE" + artifacts: + paths: + - ./pylint/ quality: - stage: test + stage: quality + allow_failure: true image: docker:stable variables: DOCKER_DRIVER: overlay2 - allow_failure: true services: - docker:stable-dind script: