@@ -6,19 +6,28 @@ workflows:
66 jobs :
77 - test-py37
88 - test-py36
9- - test-py27
109 - check
1110
1211jobs :
1312
1413 test-py37 :
1514 docker :
1615 - image : circleci/python:3.7
16+ - image : circleci/postgres:9.6-alpine
17+ environment :
18+ POSTGRES_DB : circle_test
19+ POSTGRES_USER : testapp
20+ POSTGRES_PASSWORD : " "
1721 working_directory : ~/rest-auth-toolkit
22+ environment :
23+ DATABASE_URL : postgres://testapp@localhost/circle_test
1824 steps :
1925 - checkout
2026 - restore_cache :
21- key : rest-auth-toolkit-py37-v2
27+ keys :
28+ - rest-auth-toolkit-py37-v6-{{ arch }}-{{ checksum "requirements-test.txt" }}-{{ checksum "demo/requirements.txt" }}
29+ - rest-auth-toolkit-py37-v6-{{ arch }}-{{ checksum "requirements-test.txt" }}
30+ - rest-auth-toolkit-py37-v6-{{ arch }}-
2231 - run :
2332 name : Install CI tools
2433 command : |
@@ -27,20 +36,34 @@ jobs:
2736 - run :
2837 name : Test with Python 3.7
2938 command : venv/bin/tox -e py37
39+ - run :
40+ name : Check coverage with Python 3.7
41+ command : venv/bin/tox -e coverage
3042 - save_cache :
31- key : rest-auth-toolkit-py37-v2
43+ key : rest-auth-toolkit-py37-v6-{{ arch }}-{{ checksum "requirements-test.txt" }}-{{ checksum "demo/requirements.txt" }}
3244 paths :
3345 - venv
3446 - .tox
3547
3648 test-py36 :
3749 docker :
3850 - image : circleci/python:3.6
51+ - image : circleci/postgres:9.6-alpine
52+ environment :
53+ POSTGRES_DB : circle_test
54+ POSTGRES_USER : testapp
55+ POSTGRES_PASSWORD : " "
3956 working_directory : ~/rest-auth-toolkit
57+ environment :
58+ DATABASE_URL : postgres://testapp@localhost/circle_test
4059 steps :
4160 - checkout
4261 - restore_cache :
43- key : rest-auth-toolkit-py36-v2
62+ keys :
63+ - rest-auth-toolkit-py36-v3-{{ arch }}-{{ checksum "requirements-test.txt" }}-{{ checksum "demo/requirements.txt" }}
64+ - rest-auth-toolkit-py36-v2-{{ arch }}-{{ checksum "requirements-test.txt" }}-{{ checksum "demo/requirements.txt" }}
65+ - rest-auth-toolkit-py36-v3-{{ arch }}-{{ checksum "requirements-test.txt" }}
66+ - rest-auth-toolkit-py36-v3-{{ arch }}-
4467 - run :
4568 name : Install CI tools
4669 command : |
@@ -50,54 +73,29 @@ jobs:
5073 name : Test with Python 3.6
5174 command : venv/bin/tox -e py36
5275 - save_cache :
53- key : rest-auth-toolkit-py36-v2
54- paths :
55- - venv
56- - .tox
57-
58- test-py27 :
59- docker :
60- # This image contains Python 3.6 (to install flit) and 2.7 (to run tests)
61- - image : circleci/python:3.6
62- working_directory : ~/rest-auth-toolkit
63- steps :
64- - checkout
65- - restore_cache :
66- key : rest-auth-toolkit-py27-v2
67- - run :
68- name : Install CI tools
69- command : |
70- python3.6 -m venv venv
71- venv/bin/pip install tox
72- - run :
73- name : Test with Python 2.7
74- command : |
75- venv/bin/tox --sdistonly
76- venv/bin/tox -e py27
77- - save_cache :
78- key : rest-auth-toolkit-py27-v2
76+ key : rest-auth-toolkit-py36-v3-{{ arch }}-{{ checksum "requirements-test.txt" }}-{{ checksum "demo/requirements.txt" }}
7977 paths :
8078 - venv
8179 - .tox
8280
8381 check :
8482 docker :
85- - image : circleci/python:3.6
83+ - image : circleci/python:3.7
8684 working_directory : ~/rest-auth-toolkit
8785 steps :
8886 - checkout
8987 - restore_cache :
90- key : rest-auth-toolkit-check-v3
88+ key : rest-auth-toolkit-check-v5
9189 - run :
9290 name : Install CI tools
9391 command : |
94- python3.6 -m venv venv
92+ python3.7 -m venv venv
9593 venv/bin/pip install tox
9694 - run :
9795 name : Check packaging and dependencies
9896 command : venv/bin/tox -e pkg
9997 - save_cache :
100- key : rest-auth-toolkit-check-v3
98+ key : rest-auth-toolkit-check-v5
10199 paths :
102100 - venv
103101 - .tox
0 commit comments