Files
Iris/.circleci/config.yml
James Barnsley 181b04f69f CircleCI config
2019-04-11 11:43:36 +12:00

73 lines
1.7 KiB
YAML

version: 2
jobs:
build:
docker:
- image: nikolaik/python-nodejs:python2.7-nodejs11
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run:
name: install python dependencies
command: |
npm install
npm run prod
pip install -e .
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
test:
docker:
- image: nikolaik/python-nodejs:python2.7-nodejs11
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run:
name: install python dependencies
command: |
npm run test
deploy:
docker:
- image: circleci/python:2.7
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- 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_test_and_deploy:
jobs:
- build:
filters:
tags:
only: /.*/
- test:
requires:
- build
filters:
tags:
only: /.*/
- deploy:
requires:
- test
filters:
branches:
only: master