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 js dependencies command: npm install - run: name: build js code command: npm run build - run: name: install python dependencies command: 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