2018-09-14 18:03:23 +00:00
|
|
|
language: python
|
|
|
|
|
|
|
|
stages:
|
2018-09-15 08:42:42 +00:00
|
|
|
- test
|
2020-04-17 20:12:06 +00:00
|
|
|
- deploy
|
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
|
|
|
- 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
|
2017-01-24 05:38:45 +00:00
|
|
|
install:
|
2019-12-31 12:49:21 +00:00
|
|
|
- pip install .
|
|
|
|
- python -c "import plexapi; print('installation ok')"
|
|
|
|
- pip install --upgrade pytest pytest-cov coveralls
|
2018-09-14 18:03:23 +00:00
|
|
|
- pip install -r requirements_dev.txt
|
2018-09-15 08:42:42 +00:00
|
|
|
- '[ -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'
|
2018-09-14 18:03:23 +00:00
|
|
|
|
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-16 08:49:47 +00:00
|
|
|
- COVERALLS_PARALLEL=true coveralls
|
2018-09-14 18:03:23 +00:00
|
|
|
|
|
|
|
after_script:
|
2018-09-15 08:42:42 +00:00
|
|
|
- '[ -z "${PLEXAPI_AUTH_MYPLEX_USERNAME}" ] || PYTHONPATH="$PWD:$PYTHONPATH" python -u tools/plex-teardowntest.py'
|
2018-09-14 18:03:23 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
include:
|
2018-09-15 08:42:42 +00:00
|
|
|
- python: 3.6
|
2018-09-14 18:03:23 +00:00
|
|
|
name: "Flake8"
|
|
|
|
install:
|
|
|
|
- pip install -r requirements_dev.txt
|
2018-10-24 13:22:04 +00:00
|
|
|
script: flake8 plexapi --exclude=compat.py --max-line-length=120 --ignore=E128,E701,E702,E731,W293,W605
|
2018-09-15 08:42:42 +00:00
|
|
|
after_success: skip
|
2018-09-14 18:03:23 +00:00
|
|
|
env:
|
|
|
|
- PLEX_CONTAINER_TAG=latest
|
2018-09-14 22:45:53 +00:00
|
|
|
- stage: test
|
|
|
|
python: 3.6
|
|
|
|
env:
|
2020-04-16 21:51:18 +00:00
|
|
|
- PLEX_CONTAINER_TAG=latest
|
2018-09-14 22:45:53 +00:00
|
|
|
- TEST_ACCOUNT_ONCE=1
|
2018-09-15 08:42:42 +00:00
|
|
|
- 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=
|
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
|