Skip to content

Commit 8fc6079

Browse files
committed
Better cache management.
1 parent b2060fb commit 8fc6079

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

.circleci/config.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
version: 2.1
44

55
executors:
6-
python-27: {docker: [{image: 'circleci/python:2.7'}]}
7-
python-34: {docker: [{image: 'circleci/python:3.4'}]}
8-
python-35: {docker: [{image: 'circleci/python:3.5'}]}
9-
python-36: {docker: [{image: 'circleci/python:3.6'}]}
10-
python-37: {docker: [{image: 'circleci/python:3.7'}]}
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'}]}
1110

1211
jobs:
1312
build:
@@ -21,7 +20,7 @@ jobs:
2120
- run: env
2221
- restore_cache:
2322
keys:
24-
- v1-dependencies-{{ checksum "requirements.txt" }}
23+
- v1-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ checksum "requirements.txt" }}
2524
- run:
2625
name: install dependencies
2726
command: |
@@ -32,7 +31,7 @@ jobs:
3231
- save_cache:
3332
paths:
3433
- ./venv
35-
key: v1-dependencies-<< parameters.executor >>-{{ checksum "requirements.txt" }}
34+
key: v1-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ checksum "requirements.txt" }}
3635
- run:
3736
name: run tests
3837
command: |
@@ -43,7 +42,6 @@ workflows:
4342
run-tests:
4443
jobs:
4544
- build: {name: run-tests-python-2.7, executor: python-27}
46-
- build: {name: run-tests-python-3.5, executor: python-34}
4745
- build: {name: run-tests-python-3.5, executor: python-35}
4846
- build: {name: run-tests-python-3.6, executor: python-36}
4947
- build: {name: run-tests-python-3.7, executor: python-37}

0 commit comments

Comments
 (0)