Skip to content

Commit b90fc79

Browse files
committed
CI: split python 2 and 3 completely
1 parent f223c4f commit b90fc79

1 file changed

Lines changed: 35 additions & 29 deletions

File tree

.circleci/config.yml

Lines changed: 35 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@ jobs:
88
auth:
99
username: $DOCKERHUB_USERNAME
1010
password: $DOCKERHUB_PASSWORD
11+
steps:
12+
- checkout
13+
- run:
14+
command: |
15+
pip install --user sqlalchemy
16+
pip install --user python-dateutil
17+
- persist_to_workspace:
18+
root: ~/.local
19+
paths:
20+
- lib # Save installed Python libraries
21+
deps3:
22+
docker:
1123
- image: cimg/python:3.7
1224
auth:
1325
username: $DOCKERHUB_USERNAME
@@ -18,10 +30,6 @@ jobs:
1830
command: |
1931
pip install --user sqlalchemy
2032
pip install --user python-dateutil
21-
sudo apt update
22-
sudo apt install python3-pip
23-
pip3 install --user sqlalchemy
24-
pip3 install --user python-dateutil
2533
- persist_to_workspace:
2634
root: ~/.local
2735
paths:
@@ -52,8 +60,8 @@ jobs:
5260
at: ~/.local
5361
- run:
5462
command: |
55-
python3 setup.py build
56-
python3 unit_tests/test_all.py -v
63+
python3.7 setup.py build
64+
python3.7 unit_tests/test_all.py -v
5765
testpostgres:
5866
docker:
5967
- image: cimg/python:2.7
@@ -62,10 +70,6 @@ jobs:
6270
password: $DOCKERHUB_PASSWORD
6371
environment:
6472
DATABASE_URL: postgresql://root@localhost/circle_test?sslmode=disable
65-
- image: cimg/postgres:9.6.5-alpine-ram
66-
auth:
67-
username: $DOCKERHUB_USERNAME
68-
password: $DOCKERHUB_PASSWORD
6973
environment:
7074
PGPORT: 5432
7175
PGUSER: root
@@ -79,7 +83,8 @@ jobs:
7983
- run:
8084
command: |
8185
sudo apt update
82-
sudo apt install -y postgresql-client
86+
sudo apt install -y postgresql postgresql-client
87+
sudo /usr/lib/postgresql/10/bin/pg_ctl -D /var/lib/postgresql/10/main -l logfile start
8388
createdb -h localhost dbp_unittest -O root
8489
pip install --user psycopg2
8590
python setup.py build
@@ -92,10 +97,6 @@ jobs:
9297
password: $DOCKERHUB_PASSWORD
9398
environment:
9499
DATABASE_URL: postgresql://root@localhost/circle_test?sslmode=disable
95-
- image: cimg/postgres:9.6.5-alpine-ram
96-
auth:
97-
username: $DOCKERHUB_USERNAME
98-
password: $DOCKERHUB_PASSWORD
99100
environment:
100101
PGPORT: 5432
101102
PGUSER: root
@@ -109,11 +110,12 @@ jobs:
109110
- run:
110111
command: |
111112
sudo apt update
112-
sudo apt install -y postgresql-client python3-pip
113+
sudo apt install -y postgresql postgresql-client
114+
sudo /usr/lib/postgresql/10/bin/pg_ctl -D /var/lib/postgresql/10/main -l logfile start
113115
createdb -h localhost dbp_unittest -O root
114-
pip3 install --user psycopg2
115-
python3 setup.py build
116-
python3 unit_tests/test_all.py -v
116+
pip install --user psycopg2
117+
python setup.py build
118+
python unit_tests/test_all.py -v
117119
docs:
118120
docker:
119121
- image: cimg/python:2.7
@@ -147,15 +149,18 @@ workflows:
147149
- testpostgres:
148150
requires:
149151
- deps
150-
- unittest3:
152+
- docs:
151153
requires:
152154
- deps
153-
- testpostgres3:
155+
main3:
156+
jobs:
157+
- deps3
158+
- unittest3:
154159
requires:
155-
- deps
156-
- docs:
160+
- deps3
161+
- testpostgres3:
157162
requires:
158-
- deps
163+
- deps3
159164

160165
# Schedule disables other triggers; nightly identical to main except
161166
# triggers and branch restriction
@@ -176,12 +181,13 @@ workflows:
176181
- testpostgres:
177182
requires:
178183
- deps
179-
- unittest3:
184+
- docs:
180185
requires:
181186
- deps
182-
- testpostgres3:
187+
- deps3
188+
- unittest3:
183189
requires:
184-
- deps
185-
- docs:
190+
- deps3
191+
- testpostgres3:
186192
requires:
187-
- deps
193+
- deps3

0 commit comments

Comments
 (0)