fix flake & add upload stage

merge-requests/2/merge
jem 2 years ago
parent 73b8fb0707
commit 5bdfb662bc

@ -2,18 +2,21 @@ image: "python:3.8"
before_script: before_script:
- python --version - python --version
- pip install setuptools wheel twine
- pip install . - pip install .
- pip install -r dev_requirements.txt - pip install -r dev_requirements.txt
stages: stages:
- lint - lint
- test - test
- upload
flake8: flake8:
stage: lint stage: lint
allow_failure: true allow_failure: true
script: 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: mypy:
stage: lint stage: lint
@ -73,3 +76,10 @@ test-1.1.3:
- unzip terraform_bin.zip -d tf_bin - unzip terraform_bin.zip -d tf_bin
- PATH=$PATH:$PWD/tf_bin - PATH=$PATH:$PWD/tf_bin
- pytest -v - pytest -v
release:
stage: upload
rules:
- if: '$CI_COMMIT_TAG != null'
script:
- python setup.py sdist bdist_wheel
Loading…
Cancel
Save