version: 2
jobs:
  build:
    docker:
      - image: cmeter/clojure-phantomjs
    working_directory: ~/repo

    steps:
      - checkout
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "project.clj" }}
          - v1-dependencies-
      - run: lein deps
      - save_cache:
          paths:
            - ~/.m2
          key: v1-dependencies-{{ checksum "project.clj" }}

<<<<<<< HEAD
=======
      # - run:
      #     shell: /bin/sh
      #     command: |
      #       lein phantomtest

>>>>>>> Update deps
  test:
    docker:
      - image: cmeter/clojure-phantomjs
    working_directory: ~/repo

    environment:
      LEIN_ROOT: "true"
      JVM_OPTS: -Xmx3200m
    
    steps:
      - checkout
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "project.clj" }}
          - v1-dependencies-
      - run: lein phantomtest

  analysis:
    docker:
      - image: cmeter/clojure-phantomjs
    working_directory: ~/repo

    environment:
      LEIN_ROOT: "true"
      JVM_OPTS: -Xmx3200m
    
    steps:
      - checkout
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "project.clj" }}
          - v1-dependencies-
      - run: lein do ancient, kibit

workflows:
  version: 2
  test_analysis:
    jobs:
      - build
      - test:
          requires:
            - build
      - analysis:
          requires:
            - build

version: 2
jobs:
  build:
    docker:
      - image: cmeter/clojure-phantomjs
    working_directory: ~/repo

    steps:
      - checkout
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "project.clj" }}
          - v1-dependencies-
      - run: lein deps
      - save_cache:
          paths:
            - ~/.m2
          key: v1-dependencies-{{ checksum "project.clj" }}

  test:
    docker:
      - image: cmeter/clojure-phantomjs
    working_directory: ~/repo

    environment:
      LEIN_ROOT: "true"
      JVM_OPTS: -Xmx3200m
    
    steps:
      - checkout
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "project.clj" }}
          - v1-dependencies-
      - run: lein phantomtest

  analysis:
    docker:
      - image: cmeter/clojure-phantomjs
    working_directory: ~/repo

    environment:
      LEIN_ROOT: "true"
      JVM_OPTS: -Xmx3200m
    
    steps:
      - checkout
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "project.clj" }}
          - v1-dependencies-
      - run: lein do ancient, kibit

workflows:
  version: 2
  test_analysis:
    jobs:
      - build
      - test:
          requires:
            - build
      - analysis:
          requires:
            - build

Remove some tests for debuggin
Remove some tests for debuggin
