Skip to content

Commit

Permalink
let tox test multiple salt versions, both cherrypy and tornado backends
Browse files Browse the repository at this point in the history
  • Loading branch information
mattp- committed Mar 12, 2019
1 parent 89fd103 commit 6c293e8
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 19 deletions.
36 changes: 21 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,29 @@ before_install:
install:
- pip install tox

matrix:
include:
- env: TOXENV=27,coverage CODECOV=py
python: 2.7
- env: TOXENV=34,coverage CODECOV=py
python: 3.4
- env: TOXENV=35,coverage CODECOV=py
python: 3.5
- env: TOXENV=36,coverage CODECOV=py
python: 3.6
- env: TOXENV=37,coverage CODECOV=py
python: 3.7-dev
- env: TOXENV=flake8
python: 3.6
env:
- PY=py27
- PY=py34
- PY=py35
- PY=py36
- PY=py37
- SALT=v2017.7.9
- SALT=v2018.8.4
- SALT=v2019.2.0
- BACKEND=cherrypy
- BACKEND=tornado

script:
- docker run -v $PWD:/pepper -ti --rm gtmanfred/pepper:latest tox -c /pepper/tox.ini -e "${CODECOV}${TOXENV}"
- docker run -v $PWD:/pepper -ti --rm gtmanfred/pepper:latest tox -c /pepper/tox.ini -e "${PY}-${BACKEND}-${SALT}"

jobs:
include:
- stage: test
python: 2.7
script: docker run -v $PWD:/pepper -ti --rm gtmanfred/pepper:latest tox -c /pepper/tox.ini -e flake8
- stage: test
python: 2.7
script: docker run -v $PWD:/pepper -ti --rm gtmanfred/pepper:latest tox -c /pepper/tox.ini -e coverage

after_success:
- sudo chown $USER .tox/
Expand Down
1 change: 0 additions & 1 deletion tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ pytest-rerunfailures
pytest-cov
git+https://github.com/saltstack/pytest-salt@master#egg=pytest-salt
tornado<5.0.0
salt
CherryPy
setuptools_scm
11 changes: 8 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
[tox]
envlist = py{27,34,35,36}-rest_{cherrypy,tornado},coverage,flake8
envlist = py{27,34,35,36}-{cherrypy,tornado}-{v2017.7.9,v2018.3.4,v2019.2.0},coverage,flake8
skip_missing_interpreters = true
skipsdist = false

[testenv]
passenv = TOXENV CI TRAVIS TRAVIS_* CODECOV_*
deps = -r{toxinidir}/tests/requirements.txt
v2017.7.9: salt==2017.7.9
v2018.3.4: salt==2018.3.4
v2019.2.0: salt==2019.2.0
develop: git+https://github.com/saltstack/salt.git@develop#egg=salt

changedir = {toxinidir}
setenv = COVERAGE_FILE = {toxworkdir}/.coverage.{envname}
commands =
rest_cherrypy: pytest --cov=pepper/ --cov-config=tox.ini --cov-report= {posargs} --salt-api-backend=rest_cherrypy
rest_tornado: pytest --cov=pepper/ --cov-config=tox.ini --cov-report= {posargs} --salt-api-backend=rest_tornado
cherrypy: pytest --cov=pepper/ --cov-config=tox.ini --cov-report= {posargs} --salt-api-backend=rest_cherrypy
tornado: pytest --cov=pepper/ --cov-config=tox.ini --cov-report= {posargs} --salt-api-backend=rest_tornado

[testenv:flake8]
basepython = python3
Expand Down

0 comments on commit 6c293e8

Please sign in to comment.