config.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. version: 2
  2. jobs:
  3. backend:
  4. docker:
  5. - image: circleci/python:3.6.4
  6. steps:
  7. - checkout
  8. - restore_cache:
  9. keys:
  10. - pip-packages-v1-{{ .Branch }}
  11. - pip-packages-v1-
  12. - run: pipenv install -e .[testing]
  13. - save_cache:
  14. paths:
  15. - ~/.local/
  16. key: pip-package-v1-{{ .Branch }}
  17. - run: pipenv run flake8 wagtail
  18. - run: pipenv run isort --check-only --diff --recursive wagtail
  19. # Filter out known false positives, while preserving normal output and error codes.
  20. # See https://github.com/motet-a/jinjalint/issues/18.
  21. - run: pipenv run jinjalint --parse-only wagtail | grep -v 'welcome_page.html:6:70' | tee /dev/tty | wc -l | grep -q '0'
  22. - run: DATABASE_NAME=wagtail.db pipenv run python -u runtests.py
  23. frontend:
  24. docker:
  25. - image: circleci/node:8.11.3
  26. steps:
  27. - checkout
  28. - restore_cache:
  29. keys:
  30. - node-v1-{{ .Branch }}-{{ checksum "package-lock.json" }}
  31. - node-v1-{{ .Branch }}-
  32. - node-v1-
  33. - run: npm install --no-save
  34. - save_cache:
  35. paths:
  36. - ~/project/node_modules/
  37. key: node-v1-{{ .Branch }}-{{ checksum "package-lock.json" }}
  38. - run: npm run lint:js
  39. - run: npm run lint:css
  40. - run: npm run test:unit:coverage -- --runInBand
  41. - run: npm rebuild node-sass
  42. - run: npm run dist
  43. - run: bash <(curl -s https://codecov.io/bash) -F frontend
  44. workflows:
  45. version: 2
  46. test:
  47. jobs:
  48. - backend
  49. - frontend