This repository was archived by the owner on Sep 1, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +41
-34
lines changed
Expand file tree Collapse file tree 1 file changed +41
-34
lines changed Original file line number Diff line number Diff line change 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+ ---
2+
3+ version : 2.1
4+
5+ executors :
6+ python-27 : {docker: [{image: 'python:2.7'}]}
7+ python-35 : {docker: [{image: 'python:3.5'}]}
8+ python-36 : {docker: [{image: 'python:3.6'}]}
9+ python-37 : {docker: [{image: 'python:3.7'}]}
10+
611jobs :
712 build :
8- docker :
9- - image : circleci/python:3.7.3
10-
13+ parameters :
14+ executor :
15+ type : executor
16+ executor : << parameters.executor >>
1117 working_directory : ~/repo
12-
1318 steps :
14- - checkout
15-
16- # Download and cache dependencies
17- - restore_cache :
18- keys :
19- - v1- dependencies-{{ checksum "requirements.txt" }}
20- # fallback to using the latest cache if no exact match is found
21- - v1-dependencies-
22-
23- - run :
24- name : install dependencies
25- command : |
26- python3 -m venv venv
27- . venv/bin/activate
28- python setup.py install
29-
30- - save_cache :
31- paths :
32- - ./ venv
33- key : v1-dependencies-{{ checksum "requirements.txt" }}
19+ - checkout
20+ - restore_cache :
21+ keys :
22+ - v1-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ checksum "requirements.txt" }}
23+ - run :
24+ name : install dependencies
25+ command : |
26+ pip install virtualenv
27+ virtualenv venv
28+ . venv/bin/activate
29+ python setup.py install
30+ - save_cache :
31+ paths :
32+ - ./venv
33+ key : v1-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ checksum "requirements.txt" }}
34+ - run :
35+ name : run tests
36+ command : |
37+ . venv/bin/activate
38+ python setup.py test
3439
35- - run :
36- name : run tests
37- command : |
38- . venv/bin/activate
39- python setup.py test
40+ workflows :
41+ run-tests :
42+ jobs :
43+ - build : {name: run-tests-python-2.7, executor: python-27}
44+ - build : {name: run-tests-python-3.5, executor: python-35}
45+ - build : {name: run-tests-python-3.6, executor: python-36}
46+ - build : {name: run-tests-python-3.7, executor: python-37}
You can’t perform that action at this time.
0 commit comments