diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8ed2adf..b999a71 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 \ No newline at end of file