Upload to PyPI using tox
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>spacecruft
parent
091c61dd65
commit
b60e7182d1
|
@ -6,7 +6,6 @@ variables:
|
||||||
GITLAB_CI_IMAGE_OPENAPI_GENERATOR_CLI: 'openapitools/openapi-generator-cli'
|
GITLAB_CI_IMAGE_OPENAPI_GENERATOR_CLI: 'openapitools/openapi-generator-cli'
|
||||||
GITLAB_CI_PYPI_DOCKER_COMPOSE: 'docker-compose~=1.23.0'
|
GITLAB_CI_PYPI_DOCKER_COMPOSE: 'docker-compose~=1.23.0'
|
||||||
GITLAB_CI_PYPI_TOX: 'tox~=3.14.0'
|
GITLAB_CI_PYPI_TOX: 'tox~=3.14.0'
|
||||||
GITLAB_CI_PYPI_TWINE: 'twine~=1.13.0'
|
|
||||||
stages:
|
stages:
|
||||||
- schema
|
- schema
|
||||||
- api
|
- api
|
||||||
|
@ -83,7 +82,7 @@ build:
|
||||||
- tox -e build
|
- tox -e build
|
||||||
- cd satnogs-db-api-client
|
- cd satnogs-db-api-client
|
||||||
- rm -rf dist
|
- rm -rf dist
|
||||||
- python setup.py sdist bdist_wheel
|
- tox -e build
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
when: always
|
when: always
|
||||||
|
@ -143,11 +142,10 @@ deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
image: ${GITLAB_CI_IMAGE_PYTHON}
|
image: ${GITLAB_CI_IMAGE_PYTHON}
|
||||||
before_script:
|
before_script:
|
||||||
- pip install "$GITLAB_CI_PYPI_TWINE"
|
- pip install "$GITLAB_CI_PYPI_TOX"
|
||||||
script:
|
script:
|
||||||
- rm -rf dist
|
- rm -rf dist
|
||||||
- python setup.py sdist bdist_wheel
|
- tox -e "upload"
|
||||||
- twine upload -u "$PYPI_USERNAME" -p "$PYPI_PASSWORD" dist/*
|
|
||||||
only:
|
only:
|
||||||
refs:
|
refs:
|
||||||
- tags
|
- tags
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
[tox]
|
||||||
|
envlist = build
|
||||||
|
|
||||||
|
[depversions]
|
||||||
|
twine = 3.1.1
|
||||||
|
|
||||||
|
[testenv:build]
|
||||||
|
skip_install = True
|
||||||
|
commands =
|
||||||
|
python setup.py sdist bdist_wheel
|
||||||
|
|
||||||
|
[testenv:upload]
|
||||||
|
deps =
|
||||||
|
twine=={[depversions]twine}
|
||||||
|
skip_install = True
|
||||||
|
commands =
|
||||||
|
python setup.py sdist bdist_wheel
|
||||||
|
twine upload -u "{env:PYPI_USERNAME}" -p "{env:PYPI_PASSWORD}" dist/*
|
9
tox.ini
9
tox.ini
|
@ -8,6 +8,7 @@ yapf = 0.27.0
|
||||||
pylint = 2.3.1
|
pylint = 2.3.1
|
||||||
pylint_django = 2.0.9
|
pylint_django = 2.0.9
|
||||||
sphinx_rtd_theme = 0.4.3
|
sphinx_rtd_theme = 0.4.3
|
||||||
|
twine = 3.1.1
|
||||||
|
|
||||||
[testenv:flake8]
|
[testenv:flake8]
|
||||||
deps =
|
deps =
|
||||||
|
@ -53,6 +54,14 @@ skip_install = True
|
||||||
commands =
|
commands =
|
||||||
python setup.py sdist bdist_wheel
|
python setup.py sdist bdist_wheel
|
||||||
|
|
||||||
|
[testenv:upload]
|
||||||
|
deps =
|
||||||
|
twine=={[depversions]twine}
|
||||||
|
skip_install = True
|
||||||
|
commands =
|
||||||
|
python setup.py sdist bdist_wheel
|
||||||
|
twine upload -u "{env:PYPI_USERNAME}" -p "{env:PYPI_PASSWORD}" dist/*
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
deps =
|
deps =
|
||||||
sphinx_rtd_theme=={[depversions]sphinx_rtd_theme}
|
sphinx_rtd_theme=={[depversions]sphinx_rtd_theme}
|
||||||
|
|
Loading…
Reference in New Issue