Skip to content

Commit 8d26b23

Browse files
committed
Update CI config to run every supported Pythion version.
1 parent 52722e7 commit 8d26b23

File tree

1 file changed

+53
-34
lines changed

1 file changed

+53
-34
lines changed

.circleci/config.yml

Lines changed: 53 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,58 @@
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-2.6: {docker: [{image: 'circleci/python:2.6'}]}
7+
python-2.7: {docker: [{image: 'circleci/python:2.7'}]}
8+
python-3.0: {docker: [{image: 'circleci/python:3.0'}]}
9+
python-3.1: {docker: [{image: 'circleci/python:3.1'}]}
10+
python-3.2: {docker: [{image: 'circleci/python:3.2'}]}
11+
python-3.3: {docker: [{image: 'circleci/python:3.3'}]}
12+
python-3.4: {docker: [{image: 'circleci/python:3.4'}]}
13+
python-3.5: {docker: [{image: 'circleci/python:3.5'}]}
14+
python-3.6: {docker: [{image: 'circleci/python:3.6'}]}
15+
python-3.7: {docker: [{image: 'circleci/python:3.7'}]}
16+
617
jobs:
718
build:
8-
docker:
9-
- image: circleci/python:3.7.3
10-
19+
parameters:
20+
executor:
21+
type: executor
22+
executor: << parameters.executor >>
1123
working_directory: ~/repo
12-
1324
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" }}
25+
- checkout
26+
- restore_cache:
27+
keys:
28+
- v1-dependencies-{{ checksum "requirements.txt" }}
29+
- v1-dependencies-
30+
- run:
31+
name: install dependencies
32+
command: |
33+
python -m venv venv
34+
. venv/bin/activate
35+
python setup.py install
36+
- save_cache:
37+
paths:
38+
- ./venv
39+
key: v1-dependencies-{{ checksum "requirements.txt" }}
40+
- run:
41+
name: run tests
42+
command: |
43+
. venv/bin/activate
44+
python setup.py test
3445
35-
- run:
36-
name: run tests
37-
command: |
38-
. venv/bin/activate
39-
python setup.py test
46+
workflows:
47+
run-tests:
48+
jobs:
49+
- build: {name: run-tests-python-2.6, executor: python-2.6}
50+
- build: {name: run-tests-python-2.7, executor: python-2.7}
51+
- build: {name: run-tests-python-3.0, executor: python-3.0}
52+
- build: {name: run-tests-python-3.1, executor: python-3.1}
53+
- build: {name: run-tests-python-3.2, executor: python-3.2}
54+
- build: {name: run-tests-python-3.3, executor: python-3.3}
55+
- build: {name: run-tests-python-3.5, executor: python-3.4}
56+
- build: {name: run-tests-python-3.5, executor: python-3.5}
57+
- build: {name: run-tests-python-3.6, executor: python-3.6}
58+
- build: {name: run-tests-python-3.7, executor: python-3.7}

0 commit comments

Comments
 (0)