tox.ini 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. [tox]
  2. envlist = py37, py38, py39, coverage, flake8, pylint
  3. [gh-actions]
  4. python =
  5. 3.7: py37, coverage, flake8, pylint
  6. 3.8: py38, coverage, flake8, pylint
  7. 3.9: py39, coverage, flake8, pylint
  8. [testenv]
  9. deps =
  10. pytest
  11. coverage
  12. -rrequirements.txt
  13. commands = coverage run -m pytest {posargs}
  14. passenv = LD_LIBRARY_PATH LD_PRELOAD
  15. [testenv:coverage]
  16. deps = coverage
  17. skip_install = true
  18. commands =
  19. coverage report
  20. coverage html
  21. # Exclude a lot of tests here without turning them off in setup.cfg, because a
  22. # developer might want to see and fix them. This is more of a regression test.
  23. [testenv:flake8]
  24. deps =
  25. flake8
  26. sphinx
  27. sphinx_rtd_theme
  28. recommonmark
  29. commands = flake8 --count --show-source --statistics
  30. # Same rationale as with flake8.
  31. [testenv:pylint]
  32. deps =
  33. pylint
  34. sphinx
  35. sphinx_rtd_theme
  36. recommonmark
  37. wont_fix = invalid-name,protected-access,too-many-lines
  38. maybe_someday = fixme,missing-docstring,line-too-long
  39. commands = pylint --disable={[testenv:pylint]wont_fix},{[testenv:pylint]maybe_someday} Lib/gflanguages
  40. [flake8]
  41. select = E,F,W
  42. exclude =
  43. # Exclude the entire build directory:
  44. build
  45. # Exclude these auto-generated files that should not be hand-edited:
  46. Lib/gflanguages/languages_public_pb2.py,
  47. # No need to traverse hidden directories such as .git, .tox
  48. .*,
  49. # Exclude virtual environment directory:
  50. venv*,
  51. # There's no value in checking cache directories
  52. __pycache__,
  53. # The Sphinx configuration file is mostly autogenerated, ignore it
  54. docs/source/conf.py,
  55. max-line-length=100
  56. ignore =
  57. E126, # continuation line over-indented for hanging indent