tests.yml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. name: tests
  2. on: [push, pull_request]
  3. jobs:
  4. test:
  5. runs-on: ubuntu-16.04
  6. strategy:
  7. max-parallel: 16
  8. matrix:
  9. python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
  10. steps:
  11. - uses: actions/checkout@v2
  12. - name: Set up Python ${{ matrix.python-version }}
  13. uses: actions/setup-python@v1
  14. with:
  15. python-version: ${{ matrix.python-version }}
  16. - name: Prepare for installation
  17. run: |
  18. python3 -m pip install setuptools
  19. python3 -m pip install --upgrade pip wheel
  20. python3 -m pip install --upgrade codecov coveralls flake8 mock pytest==4.6.3 pytest-cov selenium
  21. - name: Install
  22. run: |
  23. python3 -m pip install --upgrade -r requirements.txt
  24. python3 -m pip list
  25. - name: Prepare for tests
  26. run: |
  27. openssl version -a
  28. echo 0 | sudo tee /proc/sys/net/ipv6/conf/all/disable_ipv6
  29. - name: Test
  30. run: |
  31. catchsegv python3 -m pytest src/Test --cov=src --cov-config src/Test/coverage.ini
  32. export ZERONET_LOG_DIR="log/CryptMessage"; catchsegv python3 -m pytest -x plugins/CryptMessage/Test
  33. export ZERONET_LOG_DIR="log/Bigfile"; catchsegv python3 -m pytest -x plugins/Bigfile/Test
  34. export ZERONET_LOG_DIR="log/AnnounceLocal"; catchsegv python3 -m pytest -x plugins/AnnounceLocal/Test
  35. export ZERONET_LOG_DIR="log/OptionalManager"; catchsegv python3 -m pytest -x plugins/OptionalManager/Test
  36. export ZERONET_LOG_DIR="log/Multiuser"; mv plugins/disabled-Multiuser plugins/Multiuser && catchsegv python -m pytest -x plugins/Multiuser/Test
  37. export ZERONET_LOG_DIR="log/Bootstrapper"; mv plugins/disabled-Bootstrapper plugins/Bootstrapper && catchsegv python -m pytest -x plugins/Bootstrapper/Test
  38. 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]')"
  39. 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]')"
  40. flake8 . --count --select=E9,F63,F72,F82 --show-source --statistics --exclude=src/lib/pyaes/