config.yml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. - restore_cache:
  68. keys:
  69. - py39-v1-{{ checksum "requirements.txt" }}-{{ checksum "requirements-dev.txt" }}
  70. - run: |
  71. wget https://golang.org/dl/go<< pipeline.parameters.go-version >>.linux-amd64.tar.gz -O go.tar.gz
  72. tar -C ~/ -xzf go.tar.gz
  73. echo "export PATH=~/go/bin:$PATH" >> $BASH_ENV
  74. - run: pip install -r requirements.txt
  75. - run: pip install -r requirements-dev.txt
  76. - save_cache:
  77. key: py39-v1-{{ checksum "requirements.txt" }}-{{ checksum "requirements-dev.txt" }}
  78. paths:
  79. - '~/.cache/pip'
  80. - run:
  81. command: pip install -e . --install-option="--buildgo"
  82. name: setup
  83. - run:
  84. command: pytest --cov=hivemind ./tests
  85. name: tests
  86. - run:
  87. command: codecov
  88. name: codecov
  89. workflows:
  90. main:
  91. jobs:
  92. - build-and-test-py37
  93. - build-and-test-py38
  94. - build-and-test-py39