config.yml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. version: 2.1
  2. parameters:
  3. go-version:
  4. type: string
  5. default: 1.16.2
  6. jobs:
  7. build-and-test-py37:
  8. docker:
  9. - image: circleci/python:3.7.10
  10. steps:
  11. - checkout
  12. - restore_cache:
  13. keys:
  14. - py37-v1-{{ checksum "requirements.txt" }}-{{ checksum "requirements-dev.txt" }}
  15. - v1-{{ checksum "requirements.txt" }}-{{ checksum "requirements-dev.txt" }}
  16. - run: |
  17. wget https://golang.org/dl/go<< pipeline.parameters.go-version >>.linux-amd64.tar.gz -O go.tar.gz
  18. tar -C ~/ -xzf go.tar.gz
  19. echo "export PATH=~/go/bin:$PATH" >> $BASH_ENV
  20. - run: pip install -r requirements.txt
  21. - run: pip install -r requirements-dev.txt
  22. - save_cache:
  23. key: py37-v1-{{ checksum "requirements.txt" }}-{{ checksum "requirements-dev.txt" }}
  24. paths:
  25. - '~/.cache/pip'
  26. - run:
  27. command: pip install -e . --install-option="--buildgo"
  28. name: setup
  29. - run:
  30. command: pytest --cov=hivemind ./tests
  31. name: tests
  32. - run:
  33. command: codecov
  34. name: codecov
  35. build-and-test-py38:
  36. docker:
  37. - image: circleci/python:3.8.1
  38. steps:
  39. - checkout
  40. - restore_cache:
  41. keys:
  42. - py38-v1-{{ checksum "requirements.txt" }}-{{ checksum "requirements-dev.txt" }}
  43. - run: |
  44. wget https://golang.org/dl/go<< pipeline.parameters.go-version >>.linux-amd64.tar.gz -O go.tar.gz
  45. tar -C ~/ -xzf go.tar.gz
  46. echo "export PATH=~/go/bin:$PATH" >> $BASH_ENV
  47. - run: pip install -r requirements.txt
  48. - run: pip install -r requirements-dev.txt
  49. - save_cache:
  50. key: py38-v1-{{ checksum "requirements.txt" }}-{{ checksum "requirements-dev.txt" }}
  51. paths:
  52. - '~/.cache/pip'
  53. - run:
  54. command: pip install -e . --install-option="--buildgo"
  55. name: setup
  56. - run:
  57. command: pytest --cov=hivemind ./tests
  58. name: tests
  59. - run:
  60. command: codecov
  61. name: codecov
  62. build-and-test-py39:
  63. docker:
  64. - image: circleci/python:3.9.1
  65. steps:
  66. - checkout
  67. - run: ulimit -n 4096 # temporary workaround for py39
  68. - restore_cache:
  69. keys:
  70. - py39-v1-{{ checksum "requirements.txt" }}-{{ checksum "requirements-dev.txt" }}
  71. - run: |
  72. wget https://golang.org/dl/go<< pipeline.parameters.go-version >>.linux-amd64.tar.gz -O go.tar.gz
  73. tar -C ~/ -xzf go.tar.gz
  74. echo "export PATH=~/go/bin:$PATH" >> $BASH_ENV
  75. - run: pip install -r requirements.txt
  76. - run: pip install -r requirements-dev.txt
  77. - save_cache:
  78. key: py39-v1-{{ checksum "requirements.txt" }}-{{ checksum "requirements-dev.txt" }}
  79. paths:
  80. - '~/.cache/pip'
  81. - run:
  82. command: pip install -e . --install-option="--buildgo"
  83. name: setup
  84. - run:
  85. command: pytest --cov=hivemind ./tests
  86. name: tests
  87. - run:
  88. command: codecov
  89. name: codecov
  90. workflows:
  91. main:
  92. jobs:
  93. - build-and-test-py37
  94. - build-and-test-py38
  95. - build-and-test-py39