From 262685efdaf7d1a3255ea4a53e2159d6471075ce Mon Sep 17 00:00:00 2001 From: jem Date: Thu, 20 Jan 2022 18:53:18 +0100 Subject: [PATCH] try to upload a release --- .github/workflows/pytest.yml | 38 ---------------------------- .github/workflows/python-publish.yml | 31 ----------------------- .gitlab-ci.yml | 9 ++++++- .travis.yml | 28 -------------------- setup.py | 2 +- 5 files changed, 9 insertions(+), 99 deletions(-) delete mode 100644 .github/workflows/pytest.yml delete mode 100644 .github/workflows/python-publish.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml deleted file mode 100644 index e8bf0d1..0000000 --- a/.github/workflows/pytest.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: "pytest:py3 " - -on: - push: - branches: - - '**' - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ${{ matrix.os }} - strategy: - matrix: - python-version: [3.7, 3.8, 3.9] - os: [ubuntu-latest, macOS-latest] - - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install wheel flake8 pytest pytest-cov - pip install -r requirements.txt - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - python3 -m pytest -v diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml deleted file mode 100644 index ababeb9..0000000 --- a/.github/workflows/python-publish.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Upload Python Package - -on: - release: - types: [created] - -jobs: - deploy: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build python package - run: | - python setup.py sdist bdist_wheel - - name: Publish package - uses: pypa/gh-action-pypi-publish@v1.4.2 - with: - user: __token__ - password: ${{ secrets.PYPI_DDA }} - skip_existing: true - verbose: true diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5fef702..a8957b5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -83,4 +83,11 @@ build: rules: - if: '$CI_COMMIT_TAG == null' script: - - python setup.py sdist bdist_wheel \ No newline at end of file + - python setup.py sdist bdist_wheel + +pypi: + stage: upload + rules: + - if: '$CI_COMMIT_TAG == null' + script: + - twine upload dist/* \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7ab948e..0000000 --- a/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -language: python -python: -- '3.6' -- '3.7' -- '3.8' -- '3.9' -before_install: sudo apt-get install unzip -before_script: - - export TFVER=0.13.4 - - export TFURL=https://releases.hashicorp.com/terraform/ - - TFURL+=$TFVER - - TFURL+="/terraform_" - - TFURL+=$TFVER - - TFURL+="_linux_amd64.zip" - - wget $TFURL -O terraform_bin.zip - - mkdir tf_bin - - unzip terraform_bin.zip -d tf_bin -install: - - curl https://bootstrap.pypa.io/ez_setup.py -o - | python - - pip install . -script: - - export PATH=$PATH:$PWD/tf_bin - - pytest -v -branches: - only: - - master - - develop - - release/** diff --git a/setup.py b/setup.py index b6569a9..c7996bf 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ except IOError: setup( name=module_name, - version="1.0.2-dev", + version="1.1.0-dev", url="https://github.com/DomainDrivenArchitecture/python-terraform", license="MIT", author="Freddy Tan",