mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-01-08 19:34:12 +01:00
Merge pull request #685 from python-telegram-bot/cache-pip-ci
Cache pip for travis and appveyor + update to travis trusty container
This commit is contained in:
commit
d216b83728
3 changed files with 24 additions and 7 deletions
20
.travis.yml
20
.travis.yml
|
@ -5,19 +5,33 @@ python:
|
|||
- "3.4"
|
||||
- "3.5"
|
||||
- "3.6"
|
||||
- "pypy"
|
||||
- "pypy3"
|
||||
- "pypy-5.7.1"
|
||||
- "pypy3.5-5.8.0"
|
||||
|
||||
dist: trusty
|
||||
sudo: false
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.cache/pip
|
||||
before_cache:
|
||||
- rm -f $HOME/.cache/pip/log/debug.log
|
||||
|
||||
install:
|
||||
- pip install coveralls
|
||||
- pip install -U wheel
|
||||
- pip install -r requirements.txt
|
||||
- pip install -r requirements-dev.txt
|
||||
- if [[ $TRAVIS_PYTHON_VERSION != 'pypy'* ]]; then pip install ujson; fi
|
||||
|
||||
script:
|
||||
- nosetests -v --with-flaky --no-flaky-report --with-coverage --cover-package=telegram/ tests
|
||||
- if [[ $TRAVIS_PYTHON_VERSION == 3.5 ]]; then pre-commit run --all-files; fi
|
||||
- python ./setup.py bdist_dumb
|
||||
|
||||
after_success:
|
||||
coveralls
|
||||
coveralls
|
|
@ -15,12 +15,14 @@ environment:
|
|||
install:
|
||||
# We need wheel installed to build wheels
|
||||
- "git submodule update --init --recursive"
|
||||
- "%PYTHON%\\python.exe -m pip install wheel"
|
||||
- "%PYTHON%\\python.exe -m pip install -U wheel"
|
||||
- "%PYTHON%\\python.exe -m pip install -r requirements.txt"
|
||||
- "%PYTHON%\\python.exe -m pip install -r requirements-dev.txt"
|
||||
|
||||
build: off
|
||||
|
||||
cache: C:\Users\appveyor\pip\wheels
|
||||
|
||||
test_script:
|
||||
- "%python%\\Scripts\\nosetests -v --with-flaky --no-flaky-report tests"
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ import sys
|
|||
import inspect
|
||||
import warnings
|
||||
from collections import namedtuple
|
||||
import platform
|
||||
|
||||
import certifi
|
||||
import logging
|
||||
|
@ -110,9 +111,9 @@ def check_object(h4):
|
|||
|
||||
|
||||
def test_official():
|
||||
if not sys.version_info >= (3, 5):
|
||||
warnings.warn('Not running tests, since follow_wrapped is not supported on this platform'
|
||||
'(python version >= 3.5 required)')
|
||||
if not sys.version_info >= (3, 5) or platform.python_implementation() != 'CPython':
|
||||
warnings.warn('Not running "official" tests, since follow_wrapped is not supported'
|
||||
'on this platform (cpython version >= 3.5 required)')
|
||||
return
|
||||
|
||||
http = urllib3.PoolManager(
|
||||
|
|
Loading…
Reference in a new issue