[tox]
envlist = py{37,38,39}-pillow{71,-latest},pypy3,check
skip_missing_interpreters = true
isolated_build = true

[gh-actions]
python =
    3.7: py37-pillow71
    3.8: py38-pillow-latest, check
    3.9: py39-pillow-latest
    pypy3: pypy3

[testenv]
deps =
    pillow70: Pillow==7.0.0
    pillow71: Pillow==7.1.0
extras =
    all
    tests
commands = pytest --cov sigal --cov-report term tests/

[testenv:check]
skip_install = true
deps =
    check-manifest
    collective.checkdocs
commands =
    python setup.py check --restructuredtext
    check-manifest -v --ignore sigal/version.py,.readthedocs.yml {toxinidir}

[testenv:doc]
whitelist_externals = make
extras = docs
usedevelop = true
commands =
    make -C docs html

[testenv:demo]
usedevelop = true
deps =
    feedgenerator
    cryptography
commands =
    sigal build -c tests/sample/sigal.conf.py
    sigal serve tests/sample/_build
