.travis.yml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. language: python
  2. python:
  3. - 3.9
  4. - 3.10
  5. services:
  6. - docker
  7. cache: pip
  8. before_install:
  9. - pip install --upgrade pip wheel
  10. - pip install --upgrade codecov coveralls flake8 mock pytest==4.6.3 pytest-cov selenium
  11. # - docker build -t zeronet .
  12. # - docker run -d -v $PWD:/root/data -p 15441:15441 -p 127.0.0.1:43110:43110 zeronet
  13. install:
  14. - pip install --upgrade -r requirements.txt
  15. - pip list
  16. before_script:
  17. - openssl version -a
  18. # Add an IPv6 config - see the corresponding Travis issue
  19. # https://github.com/travis-ci/travis-ci/issues/8361
  20. - if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
  21. sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6';
  22. fi
  23. script:
  24. - catchsegv python -m pytest src/Test --cov=src --cov-config src/Test/coverage.ini
  25. - export ZERONET_LOG_DIR="log/CryptMessage"; catchsegv python -m pytest -x plugins/CryptMessage/Test
  26. - export ZERONET_LOG_DIR="log/Bigfile"; catchsegv python -m pytest -x plugins/Bigfile/Test
  27. - export ZERONET_LOG_DIR="log/AnnounceLocal"; catchsegv python -m pytest -x plugins/AnnounceLocal/Test
  28. - export ZERONET_LOG_DIR="log/OptionalManager"; catchsegv python -m pytest -x plugins/OptionalManager/Test
  29. - export ZERONET_LOG_DIR="log/Multiuser"; mv plugins/disabled-Multiuser plugins/Multiuser && catchsegv python -m pytest -x plugins/Multiuser/Test
  30. - export ZERONET_LOG_DIR="log/Bootstrapper"; mv plugins/disabled-Bootstrapper plugins/Bootstrapper && catchsegv python -m pytest -x plugins/Bootstrapper/Test
  31. - 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]')"
  32. - 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]')"
  33. - flake8 . --count --select=E9,F63,F72,F82 --show-source --statistics --exclude=src/lib/pyaes/
  34. after_failure:
  35. - zip -r log.zip log/
  36. - curl --upload-file ./log.zip https://transfer.sh/log.zip
  37. after_success:
  38. - codecov
  39. - coveralls --rcfile=src/Test/coverage.ini