python-plexapi/.travis.yml
2020-05-13 22:41:52 +02:00

83 lines
3.1 KiB
YAML

language: python
stages:
- test
- deploy
sudo: required
services:
- docker
python:
- 3.6
env:
global:
- PLEXAPI_AUTH_SERVER_BASEURL=http://127.0.0.1:32400
matrix:
- PLEX_CONTAINER_TAG=latest
before_install:
- pip install --upgrade pip
- pip install --upgrade setuptools
install:
- pip install .
- python -c "import plexapi; print('installation ok')"
- pip install --upgrade pytest pytest-cov coveralls
- pip install -r requirements_dev.txt
- '[ -z "${PLEXAPI_AUTH_MYPLEX_USERNAME}" ] && PYTHONPATH="$PWD:$PYTHONPATH" python -u tools/plex-bootstraptest.py
--destination plex --advertise-ip=127.0.0.1 --bootstrap-timeout 540 --docker-tag $PLEX_CONTAINER_TAG --unclaimed ||
PYTHONPATH="$PWD:$PYTHONPATH" python -u tools/plex-bootstraptest.py --destination plex --advertise-ip=127.0.0.1
--bootstrap-timeout 540 --docker-tag $PLEX_CONTAINER_TAG'
script:
- py.test tests -rxXs --ignore=tests/test_sync.py --tb=native --verbose --cov-config .coveragerc --cov=plexapi
- PLEXAPI_HEADER_PROVIDES='controller,sync-target' PLEXAPI_HEADER_PLATFORM=iOS PLEXAPI_HEADER_PLATFORM_VERSION=11.4.1
PLEXAPI_HEADER_DEVICE=iPhone py.test tests/test_sync.py -rxXs --tb=native --verbose --cov-config .coveragerc
--cov=plexapi --cov-append
after_success:
- COVERALLS_PARALLEL=true coveralls
after_script:
- '[ -z "${PLEXAPI_AUTH_MYPLEX_USERNAME}" ] || PYTHONPATH="$PWD:$PYTHONPATH" python -u tools/plex-teardowntest.py'
notifications:
webhooks: https://coveralls.io/webhook
jobs:
include:
- python: 3.6
name: "Flake8"
install:
- pip install -r requirements_dev.txt
script: flake8 plexapi --exclude=compat.py --max-line-length=120 --ignore=E128,E701,E702,E731,W293,W605
after_success: skip
env:
- PLEX_CONTAINER_TAG=latest
- stage: test
python: 3.6
env:
- PLEX_CONTAINER_TAG=latest
- TEST_ACCOUNT_ONCE=1
- stage: test
python: 3.6
if: type != 'pull_request' # pull requests always run over unclaimed server
after_success: skip
env:
- PLEX_CONTAINER_TAG=latest PLEXAPI_AUTH_MYPLEX_USERNAME=
- stage: deploy
name: "Deploy to PyPi"
python: 3.6
install: true
script: true
env:
- PLEX_CONTAINER_TAG=latest
deploy:
provider: pypi
user: hellowlol
password:
secure: cwMf16s+PxIUjt6/pKE7KeQPsWg4Atf9JvipkLTjx1VrVBilSjrZ7fkSDDjglkz4sCynw5/fzQRkBWqLdyqPigwKICYbpc6QWwvR+WWQLfe04zl+d4AmDljN2rtNkThlpH2qKNaFX7Up3AAcTf+GtQ7weAAyjMyJaiWBTFcgc2eBMDgEkS3bhiF4qdbfdAYbHVurJwCWXfHjkIiBJxDHA15cQRhJpkqQGIYzAst6ZwEr/Aw9FwqfC3lvFM3uIQ7sfFa/UdIesQZ50IT//roI1bvTg2T4gAMRYMs09jFm1E5mnPn4qxvK2hzsiNNesw3wSXhCehJFym8cO5jX+EYnfNJuWJtappIZeJGKldVC2g2v3PNWhmqbbKnyc446rkPtjVQqrSSUjPNOhTG61n872JVnizopo8ISDAtceSoC/mySItzjRQnRDrelkhHdV33WSyOsJKTw0H2LzjZDQRxxTqABmmCwzn7h+ycQ2Xk2INu9gt0hgIOco6Lt6VeoDMXhD6wAGDAaD7XBQwD/JSbGZns3VIgoLMxyHda9S6UeDmwwoAWhHM0mbzt0L618R+7CK0E+3vQ2k2Ee23tKIOq7DvZMpmLLjUE3wlckoKCPDrgP7Tuf5nUoz6kWv3Hxsb0wZCuVO0npSCFx+JOSQ6/7ONU4eh3hvjnnb6vqAgKqQ80=
on:
tags: true