fix flake & add upload stage

This commit is contained in:
jem 2022-01-19 18:08:22 +01:00
parent 73b8fb0707
commit 5bdfb662bc

View file

@ -2,18 +2,21 @@ image: "python:3.8"
before_script:
- python --version
- pip install setuptools wheel twine
- pip install .
- pip install -r dev_requirements.txt
stages:
- lint
- test
- upload
flake8:
stage: lint
allow_failure: true
script:
- flake8 --max-line-length=120 python_terraform/*.py
- flake8 --max-line-length=120 --count --select=E9,F63,F7,F82 --show-source --statistics python_terraform/*.py
- flake8 --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics python_terraform/*.py
mypy:
stage: lint
@ -73,3 +76,10 @@ test-1.1.3:
- unzip terraform_bin.zip -d tf_bin
- PATH=$PATH:$PWD/tf_bin
- pytest -v
release:
stage: upload
rules:
- if: '$CI_COMMIT_TAG != null'
script:
- python setup.py sdist bdist_wheel