Files
Iris/.circleci/config.yml

76 lines
1.8 KiB
YAML
Raw Normal View History

2019-04-11 11:16:43 +12:00
version: 2
jobs:
build:
docker:
2019-04-11 11:43:36 +12:00
- image: nikolaik/python-nodejs:python2.7-nodejs11
2019-04-11 11:16:43 +12:00
steps:
- checkout
2019-04-11 11:43:36 +12:00
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
2019-04-11 12:12:39 +12:00
- run:
name: install js dependencies
command: npm install
- run:
name: build js code
command: npm run build
2019-04-11 11:16:43 +12:00
- run:
name: install python dependencies
2019-04-11 12:12:39 +12:00
command: pip install -e .
2019-04-11 11:43:36 +12:00
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
2019-04-11 11:34:38 +12:00
test:
2019-04-11 11:16:43 +12:00
docker:
2019-04-11 11:43:36 +12:00
- image: nikolaik/python-nodejs:python2.7-nodejs11
2019-04-11 11:16:43 +12:00
steps:
- checkout
2019-04-11 11:43:36 +12:00
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
2019-04-11 11:16:43 +12:00
- run:
name: install python dependencies
command: |
2019-04-11 11:34:38 +12:00
npm run test
deploy:
docker:
- image: circleci/python:2.7
steps:
- checkout
2019-04-11 11:43:36 +12:00
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
2019-04-11 11:16:43 +12:00
- 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
2019-04-11 11:34:38 +12:00
build_test_and_deploy:
2019-04-11 11:16:43 +12:00
jobs:
- build:
filters:
tags:
only: /.*/
2019-04-11 11:34:38 +12:00
- test:
2019-04-11 11:16:43 +12:00
requires:
- build
2019-04-11 11:34:38 +12:00
filters:
tags:
only: /.*/
- deploy:
requires:
- test
2019-04-11 11:16:43 +12:00
filters:
branches:
only: master