diff -r d69d9c919448 -r 5028ff294931 .gitlab-ci.yml --- a/.gitlab-ci.yml Wed Nov 20 19:40:26 2019 +0100 +++ b/.gitlab-ci.yml Sat Nov 23 00:38:44 2019 +0100 @@ -1,8 +1,15 @@ image: python:3.5 stages: - - build - test + - dist + - quality + +cache: + paths: + - bin/ + - eggs/ + - parts/ before_script: - export http_proxy=http://172.17.0.1:3128/ @@ -10,26 +17,48 @@ - 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: + - pwd + - ls -l + - head ./bin/test - ./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: