2
0

Makefile 984 B

123456789101112131415161718192021222324252627282930313233343536
  1. .PHONY: clean-pyc develop lint test coverage
  2. help:
  3. @echo "clean-pyc - remove Python file artifacts"
  4. @echo "develop - install development dependencies"
  5. @echo "lint - check style with flake8"
  6. @echo "test - run tests"
  7. @echo "coverage - check code coverage"
  8. clean-pyc:
  9. find . -name '*.pyc' -exec rm -f {} +
  10. find . -name '*.pyo' -exec rm -f {} +
  11. find . -name '*~' -exec rm -f {} +
  12. develop: clean-pyc
  13. pip install -e .[testing,docs]
  14. npm install --no-save && npm run build
  15. lint:
  16. flake8
  17. isort --check-only --diff .
  18. # Filter out known false positives, while preserving normal output and error codes.
  19. # See https://github.com/motet-a/jinjalint/issues/18.
  20. jinjalint --parse-only wagtail | grep -v 'welcome_page.html:6:70' | tee /dev/tty | wc -l | grep -q '0'
  21. npm run lint:css --silent
  22. npm run lint:js --silent
  23. doc8 docs
  24. test:
  25. python runtests.py
  26. coverage:
  27. coverage run --source wagtail runtests.py
  28. coverage report -m
  29. coverage html
  30. open coverage_html_report/index.html