diff --git a/.circleci/config.yml b/.circleci/config.yml index 9e5c555..a2b6ef4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -96,23 +96,24 @@ jobs: docker: - image: python:3.6 steps: + #Get package - restore_cache: keys: - source-v1-{{ .Branch }}-{{ .Revision }} - source-v1-{{.Branch}}- - checkout + - save_cache: + key: source-v1-{{ .Branch }}-{{ .Revision }} + paths: + - . + #Get main dependencies - restore_cache: - key: - dependencies-v1-{{ arch }}-{{ .Branch }}-{{ checksum "requirements.txt" - }} - - run: - name: Install test dependencies - command: - "if [[ -f tests/requirements.txt ]]; then \n pip3\ - \ install -r tests/requirements.txt\nfi\n" + key: dependencies-v1-{{ arch }}-{{ .Branch }}-{{ checksum "requirements.txt"}} + - run: name: Install Package Dependencies command: pip3 install -r requirements.txt + - save_cache: key: dependencies-v1-{{ arch }}-{{ .Branch }}-{{ checksum "requirements.txt" @@ -120,10 +121,20 @@ jobs: paths: - /usr/local/lib/python3.6/site-packages - /user/local/bin + - restore_cache: + key: test-dependencies-v1-{{arch}}-{{ .Branch }}-{{ checksum "tests/requirements.txt"}} + + - run: + name: Install test dependencies + command: "if [[ -f tests/requirements.txt ]]; + then pip3 install -r tests/requirements.txt + fi" - save_cache: - key: source-v1-{{ .Branch }}-{{ .Revision }} + key: test-dependencies-v1-{{arch}}-{{ .Branch }}-{{ checksum "tests/requirements.txt"}} paths: - - . + - /usr/local/lib/python3.6/site-packages + - /usr/local/bin/ + test: working_directory: /root/build docker: @@ -132,10 +143,9 @@ jobs: - restore_cache: keys: - source-v1-{{ .Branch }}-{{ .Revision }} + - checkout - restore_cache: - key: - dependencies-v1-{{ arch }}-{{ .Branch }}-{{ checksum "requirements.txt" - }} + key: test-dependencies-v1-{{arch}}-{{ .Branch }}-{{ checksum "tests/requirements.txt"}} - run: name: Install package (Python 3) command: pip3 install -U -e .