From 5bdfb662bc69fc345b7736b7e28c458d7a03d3cf Mon Sep 17 00:00:00 2001 From: jem Date: Wed, 19 Jan 2022 18:08:22 +0100 Subject: [PATCH] fix flake & add upload stage --- .gitlab-ci.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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