Upgrade to Python 3.6 and fix tests in Travis CI (#98)
* Remove pytest-mozlog command unless running in Jenkins pipeline * Run tests against Python 3.6 in Travis CI * Only install mozlog when running against legacy Python
This commit is contained in:
Родитель
11e773eba3
Коммит
b2b949e1cb
12
.travis.yml
12
.travis.yml
|
@ -2,7 +2,7 @@ sudo: required
|
|||
language: python
|
||||
python:
|
||||
- 2.7
|
||||
- 3.5
|
||||
- 3.6
|
||||
addons:
|
||||
firefox: 47.0.2
|
||||
env:
|
||||
|
@ -14,15 +14,13 @@ matrix:
|
|||
env: TOXENV=flake8
|
||||
- python: 2.7
|
||||
env: TOXENV=py27
|
||||
- python: 3.5
|
||||
- python: 3.6
|
||||
env: TOXENV=flake8
|
||||
- python: 3.5
|
||||
env: TOXENV=py35
|
||||
- python: 3.6
|
||||
env: TOXENV=py36
|
||||
exclude:
|
||||
- python: 2.7
|
||||
- python: 3.5
|
||||
allow_failures:
|
||||
- env: TOXENV=py35
|
||||
- python: 3.6
|
||||
install:
|
||||
- pip install tox
|
||||
before_script:
|
||||
|
|
|
@ -17,7 +17,7 @@ pipeline {
|
|||
}
|
||||
environment {
|
||||
/** See https://issues.jenkins-ci.org/browse/JENKINS-42771 - we'd like to expand this out into multi-line concatenations */
|
||||
PYTEST_ADDOPTS = "-n=10 --tb=short --color=yes --driver=SauceLabs --variables=capabilities.json"
|
||||
PYTEST_ADDOPTS = "-n=10 --tb=short --color=yes --driver=SauceLabs --variables=capabilities.json --log-raw=results/py27.log"
|
||||
SAUCELABS_API_KEY = credentials('SAUCELABS_API_KEY')
|
||||
}
|
||||
stages {
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
mock==2.0.0
|
||||
pytest==3.0.7
|
||||
pytest-metadata==1.3.0
|
||||
pytest-selenium==1.9.1
|
||||
pytest-xdist==1.15.0
|
5
tox.ini
5
tox.ini
|
@ -1,14 +1,13 @@
|
|||
[tox]
|
||||
envlist = py{27,35}, flake8
|
||||
envlist = py{27,36}, flake8
|
||||
|
||||
[testenv]
|
||||
passenv = DISPLAY PYTEST_ADDOPTS PYTEST_BASE_URL SAUCELABS_API_KEY \
|
||||
SAUCELABS_USERNAME JENKINS_URL JOB_NAME BUILD_NUMBER
|
||||
deps = -rrequirements/tests.txt
|
||||
deps = -rrequirements/{envname}-tests.txt
|
||||
commands = pytest \
|
||||
--junit-xml=results/{envname}.xml \
|
||||
--html=results/{envname}.html \
|
||||
--log-raw=results/{envname}.log \
|
||||
{posargs:tests}
|
||||
|
||||
[testenv:flake8]
|
||||
|
|
Загрузка…
Ссылка в новой задаче