version: 2
executorType: docker
jobs:
  build:
    docker:
      - image: circleci/clojure:lein-2.8.1
    working_directory: ~/repo
    steps:
      - checkout
      - restore_cache:
          keys:
          - v1-dependencies-{{ .Branch }}-{{ .Revision }}

      - run: 
          name: add lein voom
          command: mkdir ~/.lein && echo '{:user {:plugins [[lein-voom "0.1.0-20180617_140646-g0ba7ec8"]]}}' > ~/.lein/profiles.clj

      - run: 
          name: lein voom build deps
          command: lein voom build-deps

      - run: 
          name: test
          command: lein test

      - run:
          name: lein deploy
          command: lein deploy

      - save_cache:
          paths:
            - ~/.m2
          key: v1-dependencies-{{ .Branch }}-{{ .Revision }}

version: 2
executorType: docker
jobs:
  test:
    docker:
      - image: circleci/clojure:lein-2.8.1
    working_directory: ~/repo
    steps:
      - checkout
      - restore_cache:
          keys:
          - "{{ .Environment.CIRCLE_PROJECT_REPONAME }}-{{ checksum \"project.clj\" }}"
      - run:
          name: add lein voom
          command: mkdir ~/.lein && echo '{:user {:plugins [[lein-voom "0.1.0-20180617_140646-g0ba7ec8"]]}}' > ~/.lein/profiles.clj
      - run:
          name: lein voom build deps
          command: lein voom build-deps
      - run:
          name: test
          command: lein test
      - save_cache:
          paths:
            - ~/.m2
          key: "{{ .Environment.CIRCLE_PROJECT_REPONAME }}-{{ checksum \"project.clj\" }}"
  release:
    docker:
      - image: circleci/clojure:lein-2.8.1
    working_directory: ~/repo
    steps:
      - checkout
      - restore_cache:
          keys:
          - "{{ .Environment.CIRCLE_PROJECT_REPONAME }}-{{ checksum \"project.clj\" }}"
      - run:
          name: add lein voom
          command: mkdir ~/.lein && echo '{:user {:plugins [[lein-voom "0.1.0-20180617_140646-g0ba7ec8"]]}}' > ~/.lein/profiles.clj
      - run:
          name: lein voom build deps
          command: lein voom build-deps
      - run:
          name: lein deploy
          command: lein deploy
      - save_cache:
          paths:
            - ~/.m2
          key: "{{ .Environment.CIRCLE_PROJECT_REPONAME }}-{{ checksum \"project.clj\" }}"

workflows:
  version: 2
  test-build-deploy:
    jobs:
      - test
      - release:
          requires:
            - test
          filters:
             branches:
               only: master
Switch to circle workflows, only deploy on master, fix cache behavior.
    Switch to circle workflows, only deploy on master, fix cache behavior.
