Circleci scoping

This commit is contained in:
James Barnsley
2019-04-11 11:16:43 +12:00
parent ef541f4b24
commit 8fe667bbae

57
.circleci/config.yml Normal file
View File

@ -0,0 +1,57 @@
version: 2
jobs:
build:
docker:
- image: circleci/python:2.7
steps:
- checkout
- restore_cache:
key: v1-dependency-cache-{{ checksum "setup.py" }}
- run:
name: install python dependencies
command: |
pip install -e .
- store_artifacts:
path: htmlcov/
deploy:
docker:
- image: circleci/python:2.7
steps:
- checkout
- restore_cache:
key: v1-dependency-cache-{{ checksum "setup.py" }}
- run:
name: install python dependencies
command: |
pip install -e .
- run:
name: init .pypirc
command: |
echo -e "[pypi]" >> ~/.pypirc
echo -e "username = jaedb" >> ~/.pypirc
echo -e "password = $PYPI_PASSWORD" >> ~/.pypirc
- run:
name: create packages
command: |
python setup.py sdist
workflows:
version: 2
build_and_deploy:
jobs:
- build:
filters:
tags:
only: /.*/
- deploy:
requires:
- build
filters:
branches:
only: master