1
mirror of https://github.com/streamlink/streamlink synced 2024-11-01 01:19:33 +01:00
streamlink/.travis.yml
back-to 9bb99d045d tests: run Python 3.7 tests on AppVeyor and Travis-CI (#1928)
* tests: run Python 3.7 tests on AppVeyor and Travis-CI

Travis-ci

- `dist: xenial` for 3.7 because `openssl` is to old on `trusty`
https://github.com/travis-ci/travis-ci/issues/9069
https://github.com/travis-ci/travis-ci/issues/9815

AppVeyor

- https://github.com/appveyor/ci/issues/2475

* tests: Add Python 3.8 for travis-ci and allow_failures
2018-07-13 16:17:26 -07:00

108 lines
2.8 KiB
YAML

language: python
env:
global:
- STREAMLINK_DIST_DIR=${TRAVIS_BUILD_DIR}/dist
- STREAMLINK_INSTALLER_DIST_DIR=${STREAMLINK_DIST_DIR}/nsis
- SDIST_KEY_FILE="${TRAVIS_BUILD_DIR}/signing.key"
matrix:
include:
- python: '2.7'
- python: '3.4'
- python: '3.5'
env: BUILD_DOCS=yes BUILD_INSTALLER=yes BUILD_SDIST=yes DEPLOY_PYPI=yes
- python: '3.6'
- python: '3.7'
dist: xenial
sudo: true
- python: '3.8-dev'
dist: xenial
sudo: true
allow_failures:
- python: '3.8-dev'
before_install:
- pip install --disable-pip-version-check --upgrade pip setuptools
- pip install -r dev-requirements.txt
- pip install pycountry
- if [[ $BUILD_DOCS == 'yes' ]]; then
pip install -r docs-requirements.txt;
pip install doctr;
fi
install:
- pip install -e .
script:
- pytest --cov
- if [[ $BUILD_DOCS == 'yes' ]]; then make --directory=docs html; fi
- if [[ $BUILD_INSTALLER == 'yes' ]]; then ./script/makeinstaller.sh; fi
after_success:
- set -e
# latest version - push docs for master
- if [[ $BUILD_DOCS == 'yes' && $TRAVIS_REPO_SLUG == 'streamlink/streamlink' ]]; then doctr deploy latest; fi
# stable version - push docs for tags
- if [[ $BUILD_DOCS == 'yes' && $TRAVIS_REPO_SLUG == 'streamlink/streamlink' && -n "$TRAVIS_TAG" ]]; then doctr deploy .; fi
- codecov
addons:
apt:
packages:
- nsis
before_deploy:
- ./script/bintrayconfig.sh
deploy:
- provider: releases
api_key: "${RELEASES_API_KEY}"
file: "${STREAMLINK_INSTALLER_DIST_DIR}/streamlink-${TRAVIS_TAG}.exe"
file_glob: true
skip_cleanup: true
on:
tags: true
condition: $BUILD_INSTALLER = yes
repo: streamlink/streamlink
- provider: script
script: python script/github_releases.py
skip_cleanup: true
on:
tags: true
condition: $BUILD_INSTALLER == yes
repo: streamlink/streamlink
- provider: bintray
file: build/bintray-nightly.json
user: "${BINTRAY_USER}"
key: "${BINTRAY_KEY}"
skip_cleanup: true
on:
branch: master
condition: $BUILD_INSTALLER == yes && $TRAVIS_EVENT_TYPE == cron
repo: streamlink/streamlink
- provider: script
script: ./script/sdistsign.sh
skip_cleanup: true
on:
tags: true
condition: $BUILD_SDIST == yes
repo: streamlink/streamlink
- provider: releases
api_key: "${RELEASES_API_KEY}"
file: "${STREAMLINK_DIST_DIR}/streamlink-${TRAVIS_TAG}*"
file_glob: true
skip_cleanup: true
on:
tags: true
condition: $BUILD_SDIST = yes
repo: streamlink/streamlink
after_deploy:
- if [[ "$BUILD_INSTALLER" == 'yes' && "$TRAVIS_EVENT_TYPE" == 'cron' ]]; then ./script/bintrayupdate.sh; fi
doctr:
build-tags: True
deploy-repo: streamlink/streamlink.github.io
key-path: doctr_deploy_key.enc
require-master: True