config.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. version: 2.1
  2. orbs:
  3. python: circleci/python@0.2.1
  4. jobs:
  5. build-and-test:
  6. executor: python/default
  7. steps:
  8. - checkout
  9. - python/load-cache
  10. - run:
  11. command: |
  12. if [[ $(pip show grpcio | grep Version) != *1.31* ]]; then
  13. git clone https://github.com/grpc/grpc --recurse-submodules
  14. cd grpc
  15. sudo pip install -r requirements.txt
  16. export GRPC_PYTHON_BUILD_WITH_CYTHON=1
  17. sudo pip install .
  18. cd -
  19. fi
  20. name: compile-grpc # remove this command when v1.31 becomes available via pip install -r requirements.txt
  21. - run: sudo pip install codecov pytest grpcio-tools tqdm scikit-learn
  22. - python/install-deps
  23. - python/save-cache
  24. - run:
  25. command: sudo python setup.py develop
  26. name: setup
  27. - run:
  28. command: for test_file in tests/test*.py; do pytest $test_file --full-trace; done
  29. name: tests
  30. - run:
  31. command: python tests/benchmark_throughput.py --preset minimalistic
  32. name: benchmark_throughput
  33. - run:
  34. command: python tests/benchmark_dht.py
  35. name: benchmark_dht
  36. - run:
  37. command: codecov
  38. name: codecov
  39. workflows:
  40. main:
  41. jobs:
  42. - build-and-test