Skip to content

Commit 5ec0927

Browse files
committed
added publish to pypi
1 parent 9c8e69c commit 5ec0927

File tree

5 files changed

+37
-22
lines changed

5 files changed

+37
-22
lines changed

.github/workflows/pre-commit.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Publish Python 🐍 distributions 📦 to PyPI
2+
3+
on: push
4+
5+
jobs:
6+
build-n-publish:
7+
name: Build and publish Python 🐍 distributions 📦 to PyPI
8+
runs-on: ubuntu-latest
9+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Set up Python
13+
uses: actions/setup-python@v3
14+
- name: Install pypa/build
15+
run: python -m pip install --progress-bar off --user build
16+
- name: Build a binary wheel and a source tarball
17+
run: python -m build --sdist --wheel --outdir dist/ .
18+
- name: Publish distribution 📦 to PyPI
19+
uses: pypa/gh-action-pypi-publish@release/v1
20+
with:
21+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ jobs:
2222
~/.cache/pre-commit
2323
.tox
2424
.mypy_cache
25+
.coverage
2526
${{ env.pythonLocation }}
2627
key: ${{ runner.os }}-${{ env.pythonLocation }}-pip-${{ hashFiles('**/requirements-tox.txt') }}
2728
- name: Install dependencies
2829
run: python -m pip install --progress-bar off tox
2930
- name: Run all envs
30-
run: tox -p auto -e 'libcloud{30,31,32,33,34,35},pre-commit'
31+
run: tox -p auto -e 'libcloud{30,31,32,33,34,35,36},pre-commit,coverage'

setup.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import setuptools
22

3-
with open("README.md") as fh:
4-
long_description = fh.read()
3+
long_description = "[Libcloud](https://libcloud.apache.org/) driver for [vdsina.ru](https://vdsina.ru/)"
54

65
setuptools.setup(
76
name="vdsinadriver",
87
version="0.0.1",
98
author="Sergey Mezentsev",
109
author_email="[email protected]",
11-
description="Libcloud driver for vdsina",
10+
description="Libcloud driver for vdsina.ru",
1211
license="UNLICENSE",
1312
long_description=long_description,
1413
long_description_content_type="text/markdown",
@@ -19,6 +18,5 @@
1918
"Intended Audience :: System Administrators",
2019
"Operating System :: OS Independent",
2120
"Programming Language :: Python :: 3",
22-
"Topic :: Software Development :: Libraries :: Python Modules",
2321
],
2422
)

tox.ini

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
[tox]
2-
envlist = libcloud{30,31,32,33,34,35}
2+
envlist = libcloud{30,31,32,33,34,35,36}
33
# https://libcloud.apache.org/about.html#supported-python-versions
44
# envlist = py35,py36,py37,py38,py39,py310,pypy35,pypy36,pypy37,pypy38
55

66
[pytest]
77
addopts = -ra -q
88
testpaths = tests
99

10-
1110
[testenv]
1211
description = Run pytest
1312
passenv =
@@ -19,12 +18,22 @@ deps =
1918
libcloud33: apache-libcloud>=3.3.0,<3.4.0
2019
libcloud34: apache-libcloud>=3.4.0,<3.5.0
2120
libcloud35: apache-libcloud>=3.5.0,<3.6.0
21+
libcloud36: apache-libcloud>=3.6.0,<3.7.0
2222
-rrequirements-tox.txt
2323
commands =
24-
pytest --cov={envsitepackagesdir}/ruvdsdriver --cov-report=term-missing --cov-fail-under 0 {posargs}
24+
pytest {posargs}
2525

2626
[testenv:pre-commit]
2727
description = Run all pre-commit hooks.
2828
skip_install = true
2929
deps = pre-commit
3030
commands = pre-commit run --all-files
31+
32+
[testenv:coverage]
33+
description = Run pytest with coverage
34+
passenv =
35+
VDSINA_TOKEN
36+
deps =
37+
-rrequirements-tox.txt
38+
commands =
39+
pytest --cov --cov-append --cov-report=term-missing --cov-fail-under 64 {posargs}

0 commit comments

Comments
 (0)