1- # Python CircleCI 2.0 configuration file
2- #
3- # Check https://circleci.com/docs/2.0/language-python/ for more details
4- #
5- version : 2
1+ version : 2.1
2+
3+ # More about orbs: https://circleci.com/docs/2.0/using-orbs/
4+ # orbs:
5+ # ruby: circleci/[email protected] 6+
7+ commands :
8+ pip-install-deps-27 :
9+ parameters :
10+ requirements :
11+ default : " tests/requirements.txt"
12+ type : string
13+ steps :
14+ - run :
15+ name : Install Python 2.7 Dependencies
16+ command : |
17+ rm -rf venv
18+ export PATH=/home/circleci/.local/bin:$PATH
19+ pip install --user -U pip setuptools virtualenv wheel
20+ virtualenv --python=python2.7 --always-copy venv
21+ . venv/bin/activate
22+ pip install 'wheel>=0.29.0'
23+ pip install -r requirements.txt
24+ pip install -r <<parameters.requirements>>
25+
26+ pip-install-deps :
27+ parameters :
28+ requirements :
29+ default : " tests/requirements.txt"
30+ type : string
31+ steps :
32+ - run :
33+ name : Install Python Dependencies
34+ command : |
35+ python -m venv venv
36+ . venv/bin/activate
37+ pip install 'wheel>=0.29.0'
38+ pip install -r requirements.txt
39+ pip install -r <<parameters.requirements>>
40+
41+ install-couchbase-deps :
42+ steps :
43+ - run :
44+ name : Install Couchbase Dependencies
45+ command : |
46+ sudo apt-get update
47+ sudo apt install lsb-release -y
48+ curl -O https://packages.couchbase.com/releases/couchbase-release/couchbase-release-1.0-6-amd64.deb
49+ sudo dpkg -i ./couchbase-release-1.0-6-amd64.deb
50+ sudo apt-get update
51+ sudo apt install libcouchbase-dev -y
52+
653jobs :
754 python27 :
855 docker :
1562 working_directory : ~/repo
1663 steps :
1764 - checkout
18- - run :
19- name : install dependencies
20- command : |
21- rm -rf venv
22- export PATH=/home/circleci/.local/bin:$PATH
23- pip install --user -U pip setuptools virtualenv
24- virtualenv --python=python2.7 --always-copy venv
25- . venv/bin/activate
26- pip install -U pip
27- python setup.py install_egg_info
28- pip install -e '.[test]'
65+ - pip-install-deps-27
2966 - run :
3067 name : run tests
3168 environment :
3673
3774 python38 :
3875 docker :
39- - image : circleci/python:3.7.8-stretch
76+ - image : circleci/python:3.8.6
4077 - image : circleci/postgres:9.6.5-alpine-ram
4178 - image : circleci/mariadb:10-ram
4279 - image : circleci/redis:5.0.4
@@ -45,14 +82,27 @@ jobs:
4582 working_directory : ~/repo
4683 steps :
4784 - checkout
85+ - pip-install-deps
4886 - run :
49- name : install dependencies
87+ name : run tests
88+ environment :
89+ INSTANA_TEST : " true"
5090 command : |
51- python -m venv venv
5291 . venv/bin/activate
53- pip install -U pip
54- python setup.py install_egg_info
55- pip install -e '.[test]'
92+ pytest -v
93+
94+ python39 :
95+ docker :
96+ - image : circleci/python:3.9.0-buster
97+ - image : circleci/postgres:9.6.5-alpine-ram
98+ - image : circleci/mariadb:10-ram
99+ - image : circleci/redis:5.0.4
100+ - image : rabbitmq:3.5.4
101+ - image : circleci/mongo:4.2.3-ram
102+ working_directory : ~/repo
103+ steps :
104+ - checkout
105+ - pip-install-deps
56106 - run :
57107 name : run tests
58108 environment :
@@ -68,20 +118,9 @@ jobs:
68118 working_directory : ~/repo
69119 steps :
70120 - checkout
71- - run :
72- name : install dependencies
73- command : |
74- sudo apt-get update
75- sudo apt install lsb-release -y
76- curl -O https://packages.couchbase.com/releases/couchbase-release/couchbase-release-1.0-6-amd64.deb
77- sudo dpkg -i ./couchbase-release-1.0-6-amd64.deb
78- sudo apt-get update
79- sudo apt install libcouchbase-dev -y
80- python -m venv venv
81- . venv/bin/activate
82- pip install -U pip
83- python setup.py install_egg_info
84- pip install -e '.[test-couchbase]'
121+ - install-couchbase-deps
122+ - pip-install-deps :
123+ requirements : " tests/requirements-couchbase.txt"
85124 - run :
86125 name : run tests
87126 environment :
@@ -98,20 +137,9 @@ jobs:
98137 working_directory : ~/repo
99138 steps :
100139 - checkout
101- - run :
102- name : install dependencies
103- command : |
104- sudo apt-get update
105- sudo apt install lsb-release -y
106- curl -O https://packages.couchbase.com/releases/couchbase-release/couchbase-release-1.0-6-amd64.deb
107- sudo dpkg -i ./couchbase-release-1.0-6-amd64.deb
108- sudo apt-get update
109- sudo apt install libcouchbase-dev -y
110- python -m venv venv
111- . venv/bin/activate
112- pip install -U pip
113- python setup.py install_egg_info
114- pip install -e '.[test-couchbase]'
140+ - install-couchbase-deps
141+ - pip-install-deps-27 :
142+ requirements : " tests/requirements-couchbase.txt"
115143 - run :
116144 name : run tests
117145 environment :
@@ -131,17 +159,9 @@ jobs:
131159 working_directory : ~/repo
132160 steps :
133161 - checkout
134- - run :
135- name : install dependencies
136- command : |
137- rm -rf venv
138- export PATH=/home/circleci/.local/bin:$PATH
139- pip install --user -U pip setuptools virtualenv
140- virtualenv --python=python2.7 --always-copy venv
141- . venv/bin/activate
142- pip install -U pip
143- python setup.py install_egg_info
144- pip install -e '.[test-cassandra]'
162+ - install-couchbase-deps
163+ - pip-install-deps-27 :
164+ requirements : " tests/requirements-cassandra.txt"
145165 - run :
146166 name : run tests
147167 environment :
@@ -161,14 +181,8 @@ jobs:
161181 working_directory : ~/repo
162182 steps :
163183 - checkout
164- - run :
165- name : install dependencies
166- command : |
167- python -m venv venv
168- . venv/bin/activate
169- pip install -U pip
170- python setup.py install_egg_info
171- pip install -e '.[test-cassandra]'
184+ - pip-install-deps :
185+ requirements : " tests/requirements-cassandra.txt"
172186 - run :
173187 name : run tests
174188 environment :
@@ -184,14 +198,8 @@ jobs:
184198 working_directory : ~/repo
185199 steps :
186200 - checkout
187- - run :
188- name : install dependencies
189- command : |
190- python -m venv venv
191- . venv/bin/activate
192- pip install -U pip
193- python setup.py install_egg_info
194- pip install -e '.[test-gevent]'
201+ - pip-install-deps :
202+ requirements : " tests/requirements-gevent.txt"
195203 - run :
196204 name : run tests
197205 environment :
@@ -200,12 +208,14 @@ jobs:
200208 command : |
201209 . venv/bin/activate
202210 pytest -v tests/frameworks/test_gevent.py
211+
203212workflows :
204213 version : 2
205214 build :
206215 jobs :
207216 - python27
208217 - python38
218+ - python39
209219 - py27cassandra
210220 - py36cassandra
211221 - gevent38
0 commit comments