config.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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
  22. - python/install-deps
  23. - python/save-cache
  24. - run:
  25. command: sudo python setup.py develop
  26. name: setup
  27. - run:
  28. command: pytest ./tests --full-trace
  29. name: tests
  30. - run:
  31. command: python tests/benchmark_throughput.py --preset minimalistic
  32. name: benchmark
  33. - run:
  34. command: codecov
  35. name: codecov
  36. workflows:
  37. main:
  38. jobs:
  39. - build-and-test