Skip to content

Commit ba15a24

Browse files
authored
Merge pull request #10 from platformsh/circleci-pipenv-fix
Improve usage of pipenv for CircleCI
2 parents 9edea62 + 2d445ed commit ba15a24

2 files changed

Lines changed: 15 additions & 11 deletions

File tree

.circleci/config.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,19 @@ jobs:
2626
steps:
2727
- checkout
2828
- restore_cache: # ensure this step occurs *before* installing dependencies
29-
key: v2-dependency-cache-{{ .Branch }}-{{ checksum "setup.py" }}-{{ checksum "Pipfile.lock" }}
29+
keys:
30+
- v{{ .Environment.CACHE_VERSION }}-dep-cache-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
31+
- v{{ .Environment.CACHE_VERSION }}-dep-cache-{{ .Branch }}-
32+
- v{{ .Environment.CACHE_VERSION }}-dep-cache-
3033
- run:
3134
command: |
32-
sudo pip install pipenv
35+
pip install --user pipenv
3336
pipenv install
3437
- save_cache:
35-
key: v2-dependency-cache-{{ .Branch }}-{{ checksum "setup.py" }}-{{ checksum "Pipfile.lock" }}
3638
paths:
3739
- ".venv"
38-
- "/usr/local/bin"
39-
- "/usr/local/lib/python3.6/site-packages"
40+
- ~/.local/share/virtualenvs/
41+
key: v{{ .Environment.CACHE_VERSION }}-dep-cache-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
4042
- run:
4143
command: |
4244
pipenv run "pytest"
@@ -50,17 +52,19 @@ jobs:
5052
steps:
5153
- checkout
5254
- restore_cache: # ensure this step occurs *before* installing dependencies
53-
key: v2-dependency-cache-{{ .Branch }}-{{ checksum "setup.py" }}-{{ checksum "Pipfile.lock" }}
55+
keys:
56+
- v{{ .Environment.CACHE_VERSION }}-dep-cache-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
57+
- v{{ .Environment.CACHE_VERSION }}-dep-cache-{{ .Branch }}-
58+
- v{{ .Environment.CACHE_VERSION }}-dep-cache-
5459
- run:
5560
command: |
56-
sudo pip install pipenv
61+
pip install --user pipenv
5762
pipenv install
5863
- save_cache:
59-
key: v2-dependency-cache-{{ .Branch }}-{{ checksum "setup.py" }}-{{ checksum "Pipfile.lock" }}
6064
paths:
6165
- ".venv"
62-
- "/usr/local/bin"
63-
- "/usr/local/lib/python3.6/site-packages"
66+
- ~/.local/share/virtualenvs/
67+
key: v{{ .Environment.CACHE_VERSION }}-dep-cache-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
6468
- run:
6569
name: verify git tag vs. version
6670
command: |

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
cwd = os.path.abspath(os.path.dirname(__file__))
1313

14-
VERSION = "2.0.2"
14+
VERSION = "2.0.3"
1515

1616
with open('README.md', 'r', encoding='utf-8') as f:
1717
__readme__ = f.read()

0 commit comments

Comments
 (0)