diff --git a/.circleci/config.yml b/.circleci/config.yml index 6f130e1..d51fe5e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,15 +2,25 @@ # # Check https://circleci.com/docs/2.0/language-java/ for more details # -version: 2 +version: 2.1 +commands: + early_return_for_forked_pull_requests: + description: >- + If this build is from a fork, stop executing the current job and return success. + This is useful to avoid steps that will fail due to missing credentials. + steps: + - run: + name: Early return if this build is from a forked PR + command: | + if [ -n "$CIRCLE_PR_NUMBER" ]; then + echo "Nothing to do for forked PRs, so marking this step successful" + circleci step halt + fi jobs: build: docker: - image: circleci/openjdk:8u171-jdk - - image: redislabs/redisgraph:edge - port: 6379:6379 - working_directory: ~/repo environment: @@ -38,12 +48,12 @@ jobs: # run tests! # - run: mvn pmd:check - - run: mvn integration-test + - run: mvn integration-test - - run: mvn cobertura:cobertura + - early_return_for_forked_pull_requests - - run: bash <(curl -s https://codecov.io/bash) -t ${CODECOV_TOKEN} - + - run: bash <(curl -s https://codecov.io/bash) -t ${CODECOV_TOKEN} + - run: mvn -s .circleci.settings.xml -DskipTests deploy workflows: diff --git a/pom.xml b/pom.xml index c137ec9..c595090 100644 --- a/pom.xml +++ b/pom.xml @@ -114,24 +114,23 @@ - org.codehaus.mojo - cobertura-maven-plugin - 2.7 - - - html - xml - - - - - - maven-compiler-plugin - 3.0 - - 1.8 - 1.8 - + org.jacoco + jacoco-maven-plugin + 0.8.5 + + + + prepare-agent + + + + report + test + + report + + + org.sonatype.plugins