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