version: 2
jobs:
  build:
    working_directory: ~/cookbook
    docker:
      - image: openjdk:8u121
    steps:
      - checkout
      - restore_cache:
          key: v1-{{ checksum "build.gradle" }}
      - run: |
              bash gradlew check
      - save_cache:
          paths:
            - ~/.m2
          key: v1-{{ checksum "build.gradle" }}
      - store_artifacts:
          path: build/project/dependencies
          destination: dependencies
      - store_artifacts:
          path: build/test-reports
          destination: test-reports
      - store_artifacts:
          path: build/test-results
          destination: test-results


version: 2
jobs:
  build:
    working_directory: ~/cookbook
    docker:
      - image: openjdk:8u121
    steps:
      - checkout
      - restore_cache:
          key: v1-{{ checksum "build.gradle" }}
      - run: |
              bash gradlew check
      - save_cache:
          paths:
            - ~/.m2
          key: v1-{{ checksum "build.gradle" }}
      - store_artifacts:
          path: build/project/dependencies
          destination: dependencies
      - store_artifacts:
          path: build/test-reports
          destination: test-reports
      - store_test_results:
          path: build/test-results
          destination: test-results


Add test results to CircleCI
Add test results to CircleCI
