# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2.1
orbs:
  docker-publish: circleci/docker-publish@0.1.7
jobs:
  build:
    docker:
      # specify the version you desire here
      - image: circleci/node:7.10
    steps:
      - checkout
      # Download and cache dependencies
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "package.json" }}
          # fallback to using the latest cache if no exact match is found
          - v1-dependencies-

      - run: yarn install

      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "package.json" }}
      - run: mkdir ~/junit
      - run:
          command: yarn test-ci
          environment:
            JUNIT_REPORT_PATH: /home/circleci/junit/
      - store_test_results:
          path: ~/junit
      - store_artifacts:
          path: ~/junit

workflows:
  version: 2
  build:
    jobs:
      - build
  build-docker-publish:
    jobs:
      - docker-publish/publish:
          filters:
            branches:
              only: master

# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2.1
orbs:
  docker-publish: circleci/docker-publish@0.1.7
jobs:
  build:
    docker:
      # specify the version you desire here
      - image: circleci/node:7.10
    steps:
      - checkout
      # Download and cache dependencies
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "package.json" }}
          # fallback to using the latest cache if no exact match is found
          - v1-dependencies-

      - run: yarn install

      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "package.json" }}
      - run: mkdir ~/junit
      - run:
          command: yarn test-ci
          environment:
            JUNIT_REPORT_PATH: /home/circleci/junit/
      - store_test_results:
          path: ~/junit
      - store_artifacts:
          path: ~/junit

workflows:
  version: 2
  build:
    jobs:
      - build
  build-docker-publish:
    jobs:
      - docker-publish/publish:
          tag: latest
          filters:
            branches:
              only: master

Fix to publish docker image with latest tag
Fix to publish docker image with latest tag
