Skip to content

Commit

Permalink
Tox cleanup (#186)
Browse files Browse the repository at this point in the history
* Cleanup tox configuration

* Move pip freeze to .travis.yml (for all python versions)

* Use TOXENV var
  • Loading branch information
ericof committed Jul 1, 2018
1 parent 69415ba commit f02c07e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 53 deletions.
8 changes: 2 additions & 6 deletions .travis.yml
Expand Up @@ -71,10 +71,6 @@ script:
- tox -- --ini=websauna/conf/travis.ini --splinter-webdriver=chrome --splinter-headless=true --debug

after_success:
# Update coverage information in codecov.io.
# This will simply fail under py34.
- .tox/py35/bin/codecov
# Dump package list so we have a log of last known good version set
# This will simply fail under py34.
- .tox/py35/bin/pip freeze
- .tox/$TOXENV/bin/codecov
- .tox/$TOXENV/bin/pip freeze

14 changes: 7 additions & 7 deletions setup.py
Expand Up @@ -89,28 +89,28 @@
extras_require={
# Dependencies needed to build and release Websauna
'dev': [
'pyroma==2.3.1',
'ruamel.yaml',
'setuptools_git',
'pyroma==2.3.1',
'sphinx>=1.6.1',
'sphinx-autodoc-typehints',
'sphinx>=1.6.1',
'sphinx_rtd_theme',
'sphinxcontrib-zopeext',
'zest.releaser[recommended]'
'zest.releaser[recommended]',
],
'test': [
'cookiecutter',
'codecov',
'flake8',
'pytest>=3.0',
'pytest-runner',
'cookiecutter',
'coverage',
'flake8',
'flaky',
'isort',
'pytest-cov',
'pytest-runner',
'pytest-runner',
'pytest-splinter',
'pytest-timeout',
'pytest>=3.0',
'webtest',
],
"notebook": [
Expand Down
44 changes: 4 additions & 40 deletions tox.ini
Expand Up @@ -6,40 +6,16 @@ sitepackages = false
basepython =
py35: python3.5
py36: python3.6
py37: python3.7
setenv =
PYTHONHASHSEED = 100
passenv = RANDOM_VALUE FACEBOOK_CONSUMER_KEY FACEBOOK_CONSUMER_SECRET FACEBOOK_USER FACEBOOK_PASSWORD COVERAGE_PROCESS_START CODECOV_TOKEN DISPLAY SPLINTER_WEBDRIVER TRAVIS

whitelist_externals = py.test
usedevelop = true

deps =
.[notebook]
flaky
pytest>3
pytest-runner
# These fixes support for Chrome headless mode
# https://github.com/cobrateam/splinter/issues/554
--editable=git+https://github.com/websauna/pytest-splinter.git#egg=pytest-splinter
--editable=git+https://github.com/websauna/splinter.git#egg=splinter
webtest
coverage
pytest-timeout
pytest-cov
codecov
celery[redis]>=4.2.0
pyramid>1.9
selenium>3
# TODO: Temporary workaround for some Travis CI issue, should get picked up from setup.py
cookiecutter
flake8
isort
sqlalchemy-utils

.[celery,dev,notebook,test,utils]

# TBD: Our CI system does not have ability to share screenshots as artifacts, so we don't want to create them
commands =
pip freeze
echo "Running tests for PostgreSQL"
py.test \
--timeout=300 \
--durations=10 \
Expand All @@ -48,19 +24,7 @@ commands =
--cov-config .coveragerc \
{posargs}


[testenv:py37]
basepython = python3.7
commands =
pip freeze
echo "Running tests for PostgreSQL"
py.test \
--timeout=300 \
--durations=10 \
{posargs}


[testenv:style]
basepython = python3.6
commands =
flake8 websauna/
flake8 setup.py websauna/

0 comments on commit f02c07e

Please sign in to comment.