try to upload a release
This commit is contained in:
parent
9863c3c115
commit
262685efda
5 changed files with 9 additions and 99 deletions
38
.github/workflows/pytest.yml
vendored
38
.github/workflows/pytest.yml
vendored
|
@ -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
|
31
.github/workflows/python-publish.yml
vendored
31
.github/workflows/python-publish.yml
vendored
|
@ -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
|
|
@ -83,4 +83,11 @@ build:
|
|||
rules:
|
||||
- if: '$CI_COMMIT_TAG == null'
|
||||
script:
|
||||
- python setup.py sdist bdist_wheel
|
||||
- python setup.py sdist bdist_wheel
|
||||
|
||||
pypi:
|
||||
stage: upload
|
||||
rules:
|
||||
- if: '$CI_COMMIT_TAG == null'
|
||||
script:
|
||||
- twine upload dist/*
|
28
.travis.yml
28
.travis.yml
|
@ -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/**
|
2
setup.py
2
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",
|
||||
|
|
Loading…
Reference in a new issue