代码拉取完成,页面将自动刷新
language: python
python: "3.9"
branches:
only:
- /^release-.*$/
# - master
# - develop
stages:
- env-test-build-publish
jobs:
include:
- stage: env-test-build-publish
name: "Stages: PRE-BUILDING -> TESTING -> BUILDING -> PUBLISHING to PyPI"
install:
- echo "---> Running PRE-BUILDING stage..."
- python -m pip install --upgrade pip --force-reinstall
- pip install setuptools==59.5.0 --force-reinstall
- pip install urllib3==1.26.6 --force-reinstall
- pip install -r requirements.txt
before_script:
- export PYTHONPATH=$PYTHONPATH:$PWD:$PWD/pricegenerator:$PWD/tests
script:
- echo "---> Running TESTING stage..."
- pytest tests -v --disable-pytest-warnings
- echo "---> Running BUILDING stage..."
- python setup.py sdist bdist_wheel
- |
if [ $TRAVIS_PULL_REQUEST == false ]; then
echo "---> Running PUBLISHING to PyPI stage...";
python -m twine upload --verbose dist/* --skip-existing;
else
echo "---> SKIPPING PUBLISHING to PyPI stage, because this is Pull Request build";
fi
after_failure:
- echo "Some issues occurred. See full logs."
after_success:
- |
if [ $TRAVIS_PULL_REQUEST == false ]; then
echo "All stages PRE-BUILDING -> TESTING -> BUILDING -> PUBLISHING to PyPI - done";
else
echo "All PR stages PRE-BUILDING -> TESTING -> BUILDING -> [PUBLISHING to PyPI][SKIPPED] - done";
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。