123456789101112131415161718192021222324252627282930313233343536373839404142
  1. sudo: false
  2. cache:
  3. - pip
  4. - npm
  5. - directories:
  6. - $HOME/.cache/pip
  7. addons:
  8. firefox: "latest"
  9. language: python
  10. python:
  11. - "2.7"
  12. - "3.6"
  13. before_install:
  14. - "export DISPLAY=:99.0"
  15. - "sh -e /etc/init.d/xvfb start"
  16. - npm install less@2.7 less-plugin-clean-css grunt-cli
  17. - export PATH=`pwd`/node_modules/.bin:$PATH
  18. - ./manage.sh install_geckodriver ~/drivers
  19. - export PATH=~/drivers:$PATH
  20. install:
  21. - ./manage.sh npm_packages
  22. - ./manage.sh update_dev_packages
  23. - pip install codecov flake8
  24. before_script:
  25. # stop the build if there are Python syntax errors or undefined names
  26. - flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
  27. # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
  28. - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
  29. script:
  30. - ./manage.sh styles
  31. - ./manage.sh grunt_build
  32. - ./manage.sh tests
  33. after_success:
  34. - ./manage.sh py_test_coverage
  35. - codecov
  36. notifications:
  37. irc:
  38. channels:
  39. - "irc.freenode.org#searx"
  40. template:
  41. - "%{repository}/#%{build_number}/%{branch} (%{author}): %{message} %{build_url}"
  42. on_success: change