diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml deleted file mode 100644 index b52d4af..0000000 --- a/.github/workflows/pre-commit.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: pre-commit - -on: - pull_request: - push: - branches: [main] - -jobs: - pre-commit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - uses: pre-commit/action@v2.0.0 diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml new file mode 100644 index 0000000..581f4f3 --- /dev/null +++ b/.github/workflows/publish-to-pypi.yml @@ -0,0 +1,21 @@ +name: Publish Python 🐍 distributions 📦 to PyPI + +on: push + +jobs: + build-n-publish: + name: Build and publish Python 🐍 distributions 📦 to PyPI + runs-on: ubuntu-latest + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + - name: Install pypa/build + run: python -m pip install --progress-bar off --user build + - name: Build a binary wheel and a source tarball + run: python -m build --sdist --wheel --outdir dist/ . + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3978014..8670791 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,9 +22,10 @@ jobs: ~/.cache/pre-commit .tox .mypy_cache + .coverage ${{ env.pythonLocation }} key: ${{ runner.os }}-${{ env.pythonLocation }}-pip-${{ hashFiles('**/requirements-tox.txt') }} - name: Install dependencies run: python -m pip install --progress-bar off tox - name: Run all envs - run: tox -p auto -e 'libcloud{30,31,32,33,34,35},pre-commit' + run: tox -p auto -e 'libcloud{30,31,32,33,34,35,36},pre-commit,coverage' diff --git a/setup.py b/setup.py index 989d759..d985ec7 100644 --- a/setup.py +++ b/setup.py @@ -1,14 +1,13 @@ import setuptools -with open("README.md") as fh: - long_description = fh.read() +long_description = "[Libcloud](https://libcloud.apache.org/) driver for [vdsina.ru](https://vdsina.ru/)" setuptools.setup( name="vdsinadriver", version="0.0.1", author="Sergey Mezentsev", author_email="thebits@yandex.ru", - description="Libcloud driver for vdsina", + description="Libcloud driver for vdsina.ru", license="UNLICENSE", long_description=long_description, long_description_content_type="text/markdown", @@ -19,6 +18,5 @@ "Intended Audience :: System Administrators", "Operating System :: OS Independent", "Programming Language :: Python :: 3", - "Topic :: Software Development :: Libraries :: Python Modules", ], ) diff --git a/tox.ini b/tox.ini index 4d34eb3..f094129 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = libcloud{30,31,32,33,34,35} +envlist = libcloud{30,31,32,33,34,35,36} # https://libcloud.apache.org/about.html#supported-python-versions # envlist = py35,py36,py37,py38,py39,py310,pypy35,pypy36,pypy37,pypy38 @@ -7,7 +7,6 @@ envlist = libcloud{30,31,32,33,34,35} addopts = -ra -q testpaths = tests - [testenv] description = Run pytest passenv = @@ -19,12 +18,22 @@ deps = libcloud33: apache-libcloud>=3.3.0,<3.4.0 libcloud34: apache-libcloud>=3.4.0,<3.5.0 libcloud35: apache-libcloud>=3.5.0,<3.6.0 + libcloud36: apache-libcloud>=3.6.0,<3.7.0 -rrequirements-tox.txt commands = - pytest --cov={envsitepackagesdir}/ruvdsdriver --cov-report=term-missing --cov-fail-under 0 {posargs} + pytest {posargs} [testenv:pre-commit] description = Run all pre-commit hooks. skip_install = true deps = pre-commit commands = pre-commit run --all-files + +[testenv:coverage] +description = Run pytest with coverage +passenv = + VDSINA_TOKEN +deps = + -rrequirements-tox.txt +commands = + pytest --cov --cov-append --cov-report=term-missing --cov-fail-under 64 {posargs}
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: