From 75cfeec32fb8ae0238fd5f31bc10ac62d1b5f441 Mon Sep 17 00:00:00 2001 From: vtexier <vit@free.fr> Date: Wed, 5 Jun 2019 10:24:44 +0200 Subject: [PATCH] [enh] #54 add black stage in gitlab-ci (python 3.6.4 is used only in this stage) --- .gitlab-ci.yml | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ee7a6d86..8b633e68 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,8 +1,9 @@ stages: - github-sync - prepare - - build + - black - test + - build - release variables: @@ -10,6 +11,7 @@ variables: image: registry.duniter.org/docker/python3/duniterpy-builder:0.0.4 +# todo: remove useless github mirror as only repo is mirrored, not issues push_to_github: stage: github-sync variables: @@ -47,14 +49,14 @@ push_to_github: - setup.py - tests/**/*.py -build: &build +black: <<: *pyenv <<: *changes - stage: build + stage: black script: - - pip install -r requirements.txt - - pip install wheel - - python setup.py sdist bdist_wheel + - pyenv shell 3.6.4 # black install and run needs python 3.6.x minimum + - pip install -r requirements_dev.txt + - make black test: <<: *pyenv @@ -71,9 +73,22 @@ check: stage: test script: - pip install -r requirements.txt + - pyenv shell 3.6.4 # black install needs python 3.6.x minimum - pip install -r requirements_dev.txt - - make check + - pyenv shell $PYENV_PYTHON_VERSION # python 3.5.x for the check + - make mypy + - make pylint + +build: &build + <<: *pyenv + <<: *changes + stage: build + script: + - pip install -r requirements.txt + - pip install wheel + - python setup.py sdist bdist_wheel +# todo: use build anchor as build stage is repeated here releases: <<: *pyenv stage: release -- GitLab