finalizing the ci pipelines
- revert 565702d9
as it did not behave like it should have
+ add black pipeline for code consistency
This commit is contained in:
parent
565702d91f
commit
fa87c166ed
|
@ -6,22 +6,17 @@ variables:
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
# utilize pip caching
|
- .cache/pip # pip caching directory
|
||||||
- .cache/pip
|
|
||||||
# cache the virtual environment
|
|
||||||
- venv/
|
|
||||||
|
|
||||||
# setup environemnt
|
# setup environemnt
|
||||||
before_script:
|
before_script:
|
||||||
- python --version
|
- python --version
|
||||||
- pip install virtualenv
|
|
||||||
- virtualenv venv
|
|
||||||
- source venv/bin/activate
|
|
||||||
- pip install -r requirements.txt
|
- pip install -r requirements.txt
|
||||||
- pip install flake8
|
- pip install flake8 black
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- syntax
|
- syntax
|
||||||
|
- black
|
||||||
- pep8
|
- pep8
|
||||||
|
|
||||||
syntax:
|
syntax:
|
||||||
|
@ -30,9 +25,15 @@ syntax:
|
||||||
# breaking errors ie syntax errors
|
# breaking errors ie syntax errors
|
||||||
- flake8 --select=E9,F63,F7,F82 --show-source
|
- flake8 --select=E9,F63,F7,F82 --show-source
|
||||||
|
|
||||||
|
black:
|
||||||
|
stage: black
|
||||||
|
script:
|
||||||
|
# code consistency
|
||||||
|
- black . --check --line-length 120
|
||||||
|
|
||||||
pep8:
|
pep8:
|
||||||
stage: pep8
|
stage: pep8
|
||||||
script:
|
script:
|
||||||
# pep8 warnings
|
# pep8 warnings and other non breaking warnings
|
||||||
- flake8 --max-complexity=10 --max-line-length=120 --show-source
|
- flake8 --max-complexity=10 --max-line-length=120 --show-source
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
Loading…
Reference in New Issue