From 9482aff80f70939783033c485be529005b55fec9 Mon Sep 17 00:00:00 2001 From: Ken Hibino Date: Mon, 23 Mar 2020 08:44:34 -0700 Subject: [PATCH] Run goreportcard-cli after successful CI run --- .travis.yml | 1 + .travis/goreportcard.sh | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 .travis/goreportcard.sh diff --git a/.travis.yml b/.travis.yml index 9d47394..2cb9fad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,4 +9,5 @@ services: - redis-server after_success: - bash ./.travis/benchcmp.sh + - bash ./.travis/goreportcard.sh - bash <(curl -s https://codecov.io/bash) diff --git a/.travis/goreportcard.sh b/.travis/goreportcard.sh new file mode 100644 index 0000000..2be26f7 --- /dev/null +++ b/.travis/goreportcard.sh @@ -0,0 +1,8 @@ +if [ "${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}" != "master" ]; then + REMOTE_URL="$(git config --get remote.origin.url)"; + cd ${TRAVIS_BUILD_DIR}/.. && \ + git clone ${REMOTE_URL} "${TRAVIS_REPO_SLUG}-goreportcard" && \ + cd "${TRAVIS_REPO_SLUG}-goreportcard" && \ + go get -u github.com/gojp/goreportcard/cmd/goreportcard-cli && \ + goreportcard-cli -v +fi