nicobot/.travis.yml
2021-01-21 23:37:12 +01:00

36 lines
1.9 KiB
YAML

language: python
python: # this works for Linux but is ignored on macOS or Windows
- "3.5"
- "3.6"
- "3.7"
- "3.8"
- "3.9"
# See https://docs.travis-ci.com/user/languages/python/#running-python-tests-on-multiple-operating-systems
jobs:
include:
- name: "Python 3.7 on macOS"
os: osx
osx_image: xcode11.2 # Python 3.7.4 running on macOS 10.14.4
language: shell # 'language: python' is an error on Travis CI macOS
install:
# Generates nicobot/version.py
# 'python' points to Python 2.7 on macOS but points to Python 3.8 on Linux and Windows
# 'python3' is a 'command not found' error on Windows but 'py' works on Windows only
- python3 setup.py build || python setup.py build
- pip3 install -r requirements-build.txt -r requirements-runtime.txt
script:
# 'python' points to Python 2.7 on macOS but points to Python 3.8 on Linux and Windows
# 'python3' is a 'command not found' error on Windows but 'py' works on Windows only
- python3 -m unittest discover -s tests || python -m unittest discover -s tests
# See https://docs.travis-ci.com/user/deployment/pypi/
deploy:
provider: pypi
username: "__token__"
password:
secure: AfTCGn6OMDL5DKinVph4T6rFsai+xGCG4A9Ln0q5KX+3kvGVkeLHuZllTj+A7Dz9PfaZwVQRTA1jumI/c/ESDNtBgWq92dRqjpMofyX9zsikVdTWuuKfNzvebrI2ElMKc5W2e2MrNmyOgfb56LjKpaO/CeZasYURwPuWzsjktgH05840VZwlUfldEifsiQgPhQF93y7r4G7pI33yS+QNZLweNBzPddi1V5d9KvC4FyKOfwHdYvYVm4qHsqSMg/duRlB/GecAMc00WcEGc2OajM4BYJf2GA5z3Ld/fIeqWlOHpaNuaspbnygdMbzx1GbZhwAY0KrTc0oNkGw7tpwi8hi3WH/GA1Pa7JtTfBwxfaJOTiZ38r59QFxo11T5z++0wKANwx8YpNX/dL2Psqe/hAQImUY+OF6+0aYYaSOEd15N3EmsDWhjWh5RpdKum3at2uCrItSqgcVG7UxQzs30VDsFMbnSSYv4Vf32zpoaTsf8nx2Oc4iJi144VI66iB3L2eCsR7PNIgZDZ0YEIDn9s2RFYUsweh6FJgpmV3+9c7uT8TErkYiOrDVI5+oBLSAL5RZa4FuliJAvwwSX7rx89J6VM7YmRlvDqHGAQStz94E22m3p1ovTPwhojLKfWGHE49+CTouNf6wPpvDc32ktvSZhY1mEY4jsvu76rt4sBjY=
on:
tags: true
skip_existing: true
skip_cleanup: true
distributions: "sdist bdist_wheel"