2018-09-14 18:03:23 +00:00
|
|
|
language: python
|
|
|
|
|
|
|
|
stages:
|
2018-09-14 22:45:53 +00:00
|
|
|
- syntax
|
|
|
|
- name: test
|
|
|
|
if: type != pull_request
|
2018-09-14 18:03:23 +00:00
|
|
|
- name: deploy
|
2018-09-14 22:45:53 +00:00
|
|
|
if: tag = present
|
2018-09-14 18:03:23 +00:00
|
|
|
|
|
|
|
sudo: required
|
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
|
2017-01-24 05:38:45 +00:00
|
|
|
python:
|
2018-09-14 18:03:23 +00:00
|
|
|
- 2.7
|
|
|
|
- 3.4
|
|
|
|
- 3.6
|
|
|
|
|
|
|
|
env:
|
|
|
|
global:
|
|
|
|
- PLEXAPI_AUTH_SERVER_BASEURL=http://127.0.0.1:32400
|
|
|
|
matrix:
|
|
|
|
- PLEX_CONTAINER_TAG=latest
|
|
|
|
|
2017-01-29 00:22:28 +00:00
|
|
|
before_install:
|
2018-09-14 18:03:23 +00:00
|
|
|
- pip install --upgrade pip
|
|
|
|
- pip install --upgrade setuptools
|
|
|
|
- pip install --upgrade pytest pytest-cov coveralls
|
2017-01-24 05:38:45 +00:00
|
|
|
install:
|
2018-09-14 18:03:23 +00:00
|
|
|
- pip install -r requirements_dev.txt
|
|
|
|
- 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
|
|
|
|
|
2017-02-02 14:44:37 +00:00
|
|
|
script:
|
2018-09-14 18:03:23 +00:00
|
|
|
- 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
|
|
|
|
|
2017-01-29 00:13:28 +00:00
|
|
|
after_success:
|
2018-09-14 18:03:23 +00:00
|
|
|
- coveralls
|
|
|
|
|
|
|
|
after_script:
|
|
|
|
- PYTHONPATH="$PWD:$PYTHONPATH" python -u tools/plex-teardowntest.py
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
include:
|
2018-09-14 22:45:53 +00:00
|
|
|
- stage: syntax
|
|
|
|
python: 3.6
|
2018-09-14 18:03:23 +00:00
|
|
|
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
|
|
|
|
after_success: true
|
|
|
|
after_script: true
|
|
|
|
env:
|
|
|
|
- PLEX_CONTAINER_TAG=latest
|
2018-09-14 22:45:53 +00:00
|
|
|
- stage: test
|
|
|
|
python: 3.6
|
|
|
|
env:
|
|
|
|
- PLEX_CONTAINER_TAG=1.3.2.3112-1751929
|
|
|
|
- TEST_ACCOUNT_ONCE=1
|
2018-09-14 18:03:23 +00:00
|
|
|
- stage: deploy
|
|
|
|
name: "Deploy to PyPi"
|
|
|
|
python: 3.6
|
|
|
|
install: true
|
|
|
|
script: true
|
|
|
|
env:
|
|
|
|
- PLEX_CONTAINER_TAG=latest
|
|
|
|
deploy:
|
|
|
|
provider: pypi
|
|
|
|
user: mjs7231
|
|
|
|
password:
|
|
|
|
secure: UhuEN9GAp9zMEXdVTxSrbhfYf4HjTcj47l093Qh1HYKmZACxJM/+JkQCm7+oHPJpo7YDLk2we9oEsQ41maZBr9WgZI1lwR6m590M12vPhPI7NCVzINxJqebc0uZhCFsAFFKA3kzpRQbDfsBUG4yL/AzeMcvJMgIg3m07KRVhBywnnRhQ77trbBI0Io5MBzfW9PYDeGJqlNDBM7SbB4tK0udGZQT9wmFwvIoJODPDnM15Ry4vpkVNww/vVgyHklmnYlPzQgvhSMOXk0+MWlYtaKmu6uuLAiRccT1Fsmi1POKuFEq8S0Z7w4LmwxCVRaCvsZdNW5eXWgPDhZXNcLrKMwjgJt9Vj3VcD+NCywux/C1hTq7tecBocA13kzbgg4fd2sATOjQT5iaRPGrDtKm8e00hxr125n0StDxXdYGl2W5sH0LCkZE6Vq1GjXYjKFXZeTk3Fzav/3N8IxHBX3CliJB/vbloJ2mpz1kXL4UTORl9pghPyGOOq2yJPYSSWly/RsAD7UDrL1/lezaPSJGKbZJ0CMyfA83kd82/hgZflOuBuTcPHCZSU3zMCs0fsImZZxr6Qm1tbff+iyNS/ufoYgeVfsWhlEl9FoLv1g4HG6oA+uDHz+jKz9uSRHcGqD6P4JJK+H+yy0PeYfo7b6eSqFxgt8q8QfifUaCrVoCiY+c=
|
|
|
|
on:
|
|
|
|
tags: true
|