Skip to content

Commit

Permalink
symetric test setup on all devices and appveyor
Browse files Browse the repository at this point in the history
  • Loading branch information
loechel committed Oct 3, 2018
1 parent 7d23b43 commit b24071c
Show file tree
Hide file tree
Showing 3 changed files with 171 additions and 12 deletions.
48 changes: 37 additions & 11 deletions .travis.yml
@@ -1,24 +1,50 @@
language: python
sudo: false
python:
- 2.7
- 3.5
- 3.6

matrix:
include:
- python: "2.7"
env: TOXENV=docs,lint
- python: "3.6"
env: TOXENV=docs,lint
- python: "2.7"
env: TOXENV=py27
- python: "3.5"
env: TOXENV=py35
- python: "3.6"
env: TOXENV=py36
- python: "3.7"
env: TOXENV=py37
dist: xenial
sudo: true
- python: "3.7-dev"
env: TOXENV=py37
dist: xenial
sudo: true
- python: "3.8-dev"
env: TOXENV=py38
dist: xenial
sudo: true
allow_failures:
- python: "3.8-dev"
env: TOXENV=py38

install:
- pip install -U setuptools==`grep setuptools versions.cfg | awk '{print $3}'`
- pip install six==`grep '^six' versions-prod.cfg | awk '{print $3}'`
- pip install zc.buildout==`grep '^zc.buildout' versions.cfg | awk '{print $3}'`
- pip install coveralls coverage
- buildout bootstrap
- buildout install test alltests
- travis_retry pip install -U pip setuptools
- travis_retry pip install -U tox coveralls coverage

script:
- coverage run bin/alltests -v
- travis_retry tox

after_success:
- coverage combine
- coveralls
# Bails out for non-tags
- ./update_index.sh

notifications:
email: false

cache:
pip: true
directories:
Expand Down
53 changes: 53 additions & 0 deletions appveyor.yml
@@ -0,0 +1,53 @@
# AppVeyor CI settings (Windows Machine CI Tests)

matrix:
allow_failures:
- PROFILE: py38

environment:
matrix:
- PROFILE: py27-conventions
PYTHON_VERSION: 2.7"
TOXENV: "lint,docs"
- PROFILE: py35-conventions
PYTHON_VERSION: 3.6"
TOXENV: "lint,docs"
- PROFILE: py36-conventions
PYTHON_VERSION: 3.6"
TOXENV: "lint,docs"
- PROFILE: py37-conventions
PYTHON_VERSION: 3.7"
TOXENV: "lint,docs"
- PROFILE: py27
PYTHON_VERSION: 2.7"
TOXENV: "py27"
- PROFILE: py35
PYTHON_VERSION: 3.5"
TOXENV: "py35"
- PROFILE: py36
PYTHON_VERSION: 3.6"
TOXENV: "py36"
- PROFILE: py37
PYTHON_VERSION: 3.7"
TOXENV: "py37"
- PROFILE: py38
PYTHON_VERSION: 3.8"
TOXENV: "py38"

cache:
- '%LOCALAPPDATA%\pip\Cache'

version: '{branch}.{build}'

install:
- "python.exe -m pip install tox"

build: off

test_script:
- "tox.exe"

after_success:
- coveralls
# Bails out for non-tags
- ./update_index.sh
82 changes: 81 additions & 1 deletion tox.ini
@@ -1,5 +1,12 @@
[tox]
envlist = py27,py35,py36,coverage-report
envlist =
py27,
py35,
py36,
py37,
lint-py27,
lint-py36
coverage-report

[testenv]
commands =
Expand All @@ -26,3 +33,76 @@ commands =
coverage html -i
coverage xml -i
coverage report -i --fail-under=79

[testenv:isort-apply]
basepython = python2.7
skip_install = true
deps =
-cconstraints.txt
isort

commands =
isort --apply --recursive {toxinidir}/src {toxinidir}/tests {posargs}

[testenv:autopep8]
basepython = python2.7
skip_install = true
deps =
-cconstraints.txt
autopep8
docformatter

commands =
autopep8 --verbose --in-place --recursive --aggressive --aggressive {toxinidir}/src {toxinidir}/tests setup.py
docformatter --in-place --recursive {toxinidir}/src {toxinidir}/tests setup.py

[lint]
skip_install = true

deps =
-cconstraints.txt
isort
flake8
# helper to generate HTML reports:
flake8-html
# Useful flake8 plugins that are Python and Plone specific:
flake8-coding
flake8-debugger
flake8-deprecated
flake8-pytest
flake8-todo
flake8-isort
mccabe
# Potential flake8 plugins that should be used: # TBD
#flake8-blind-except
#flake8-commas
#flake8-docstrings
#flake8-mypy
#flake8-pep3101
#flake8-plone-hasattr
#flake8-string-format
#flake8_strict
#flake8-quotes

commands =
mkdir -p {toxinidir}/_build/flake8
isort --check-only --recursive {toxinidir}/src {toxinidir}/tests setup.py
- flake8 --format=html --htmldir={toxinidir}/_build/flake8 --doctests src tests setup.py
flake8 src tests setup.py --doctests

whitelist_externals =
mkdir

[testenv:lint-py27]
basepython = python2.7
skip_install = true
deps = {[lint]deps}
commands = {[lint]commands}
whitelist_externals = {[lint]whitelist_externals}

[testenv:lint-py36]
basepython = python3.6
skip_install = true
deps = {[lint]deps}
commands = {[lint]commands}
whitelist_externals = {[lint]whitelist_externals}

0 comments on commit b24071c

Please sign in to comment.