From 8fe667bbaed23ae3bbed68ee4bfe63f60609d6b3 Mon Sep 17 00:00:00 2001 From: James Barnsley Date: Thu, 11 Apr 2019 11:16:43 +1200 Subject: [PATCH] Circleci scoping --- .circleci/config.yml | 57 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..3fe7cf24 --- /dev/null +++ b/.circleci/config.yml @@ -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 \ No newline at end of file