# tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.

[tox]
envlist = py37

[testenv]
passenv = TOXENV CI TRAVIS TRAVIS_*
whitelist_externals =
    sudo
    mkdir
    wget
deps =
    -rrequirements.txt
    elasticsearch
    pytesseract
    imgkit
    speakeasy-emulator
    codecov
    ElasticMock
    mock
    mongomock
    pre-commit
    safety
    pytest
    pytest-timeout
    pytest-cov
    tox
commands =
    pip install https://github.com/area1/stpyv8/releases/download/v8.6.395.10/stpyv8-8.6.395.10-cp37-cp37m-linux_x86_64.whl
    wget https://github.com/area1/stpyv8/releases/download/v8.6.395.10/icudtl.dat
    sudo mkdir -p /usr/share/stpyv8
    sudo mv icudtl.dat /usr/share/stpyv8
    thug --version
    pytest --timeout 60 --exitfirst --cov=thug
    codecov
    safety check
    pre-commit run --all-files
