Skip to content

Commit

Permalink
WIP: circle orb
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanpm committed Feb 24, 2019
1 parent 3c9ec02 commit 441250f
Showing 1 changed file with 33 additions and 15 deletions.
48 changes: 33 additions & 15 deletions .circleci/config.yml
@@ -1,5 +1,36 @@
version: 2.1

orbs:
python:
description: |-
This is an opinionated test image:
- Tested project must work with a modern Python 3.x
commands:
install_tools:
parameters:
tools:
type: string
default: tox twine
cachekey:
type: string
default: default

steps:
- restore_cache:
key: v1-local-venv-<< parameters.cachekey >>

- run:
name: Install tools
command: |
pip install --user << parameters.tools >>
- save_cache:
key: v1-local-venv-<< parameters.cachekey >>
paths:
- "~/.local"


workflows:
version: 2
ci-cd:
Expand Down Expand Up @@ -98,21 +129,8 @@ jobs:
steps:
- checkout

- restore_cache:
key: v1-local-venv-<< parameters.image >>

- restore_cache:
key: v1-cache-pip-{{ checksum "requirements.txt" }}-{{ checksum "test-requirements.txt" }}

- run:
name: install tox
command: |
pip install --user tox
- save_cache:
key: v1-local-venv-<< parameters.image >>
paths:
- "~/.local"
- python/install_tools:
cachekey: << parameters.image >>

- run:
name: Run tests
Expand Down

0 comments on commit 441250f

Please sign in to comment.