| # Java Gradle CircleCI 2.0 configuration file |
| # |
| # Check https://circleci.com/docs/2.0/language-java/ for more details |
| # |
| version: 2 |
| jobs: |
| build: |
| docker: |
| - image: circleci/openjdk:8-jdk |
| |
| working_directory: ~/repo |
| |
| environment: |
| TERM: dumb |
| |
| steps: |
| - checkout |
| |
| # Download and cache dependencies |
| - restore_cache: |
| keys: |
| - v1-dependencies-{{ checksum "build.gradle" }} |
| # fallback to using the latest cache if no exact match is found |
| - v1-dependencies- |
| |
| - run: ./gradlew dependencies |
| |
| - save_cache: |
| paths: |
| - ~/.gradle |
| key: v1-dependencies-{{ checksum "build.gradle" }} |
| |
| # make sure it builds with build steps like swagger docs and dist |
| - run: ./gradlew build |
| |
| # run tests! |
| - run: ./gradlew check |
| |
| - store_artifacts: |
| path: build/reports |
| destination: test-reports |
| - store_test_results: |
| path: build/reports |