added formatting stage to ci

This commit is contained in:
Gonçalo Valério 2019-03-16 16:45:27 +00:00
parent 855fe17db6
commit b2d4f54cdf
1 changed files with 25 additions and 4 deletions

View File

@ -1,28 +1,49 @@
version: 2
jobs:
build:
format:
docker:
- image: circleci/python:3.6.7
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "Pipfile.lock" }}
- run:
name: install dependencies
command: |
pip install pipenv
export PIPENV_VENV_IN_PROJECT=1
pipenv install --dev
- save_cache:
paths:
- ./venv
key: v1-dependencies-{{ checksum "Pipfile.lock" }}
- run:
name: run tests
command: |
export PIPENV_VENV_IN_PROJECT=1
pipenv run black --check .
test:
docker:
- image: circleci/python:3.6.7
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "Pipfile.lock" }}
- run:
name: install dependencies
command: |
pip install pipenv
export PIPENV_VENV_IN_PROJECT=1
pipenv install --dev
- save_cache:
paths:
- ./venv
key: v1-dependencies-{{ checksum "Pipfile.lock" }}
- run:
name: run tests
command: |