tests.yml 2.1 KB

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