.travis.yml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. language: python
  2. python:
  3. - 3.4
  4. - 3.5
  5. - 3.6
  6. - 3.7
  7. - 3.8
  8. services:
  9. - docker
  10. cache: pip
  11. before_install:
  12. - pip install --upgrade pip wheel
  13. - pip install --upgrade codecov coveralls flake8 mock pytest==4.6.3 pytest-cov selenium
  14. # - docker build -t zeronet .
  15. # - docker run -d -v $PWD:/root/data -p 15441:15441 -p 127.0.0.1:43110:43110 zeronet
  16. install:
  17. - pip install --upgrade -r requirements.txt
  18. - pip list
  19. before_script:
  20. - openssl version -a
  21. # Add an IPv6 config - see the corresponding Travis issue
  22. # https://github.com/travis-ci/travis-ci/issues/8361
  23. - if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
  24. sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6';
  25. fi
  26. script:
  27. - catchsegv python -m pytest src/Test --cov=src --cov-config src/Test/coverage.ini
  28. - export ZERONET_LOG_DIR="log/CryptMessage"; catchsegv python -m pytest -x plugins/CryptMessage/Test
  29. - export ZERONET_LOG_DIR="log/Bigfile"; catchsegv python -m pytest -x plugins/Bigfile/Test
  30. - export ZERONET_LOG_DIR="log/AnnounceLocal"; catchsegv python -m pytest -x plugins/AnnounceLocal/Test
  31. - export ZERONET_LOG_DIR="log/OptionalManager"; catchsegv python -m pytest -x plugins/OptionalManager/Test
  32. - export ZERONET_LOG_DIR="log/Multiuser"; mv plugins/disabled-Multiuser plugins/Multiuser && catchsegv python -m pytest -x plugins/Multiuser/Test
  33. - export ZERONET_LOG_DIR="log/Bootstrapper"; mv plugins/disabled-Bootstrapper plugins/Bootstrapper && catchsegv python -m pytest -x plugins/Bootstrapper/Test
  34. - find src -name "*.json" | xargs -n 1 python3 -c "import json, sys; print(sys.argv[1], end=' '); json.load(open(sys.argv[1])); print('[OK]')"
  35. - find plugins -name "*.json" | xargs -n 1 python3 -c "import json, sys; print(sys.argv[1], end=' '); json.load(open(sys.argv[1])); print('[OK]')"
  36. - flake8 . --count --select=E9,F63,F72,F82 --show-source --statistics --exclude=src/lib/pyaes/
  37. after_failure:
  38. - zip -r log.zip log/
  39. - curl --upload-file ./log.zip https://transfer.sh/log.zip
  40. after_success:
  41. - codecov
  42. - coveralls --rcfile=src/Test/coverage.ini
  43. notifications:
  44. email:
  45. recipients:
  46. hello@zeronet.io
  47. on_success: change