From 85664061a649bf5ed37c5b33475d622870edcb98 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Sat, 10 Mar 2018 23:41:36 +0200 Subject: [PATCH] travis: try using python reporter for codeclimate Signed-off-by: Ruslan Kuprieiev --- .travis.yml | 4 ---- scripts/ci/after_script.sh | 13 ------------- scripts/ci/before_script.sh | 14 -------------- scripts/ci/script.sh | 8 ++++++++ 4 files changed, 8 insertions(+), 31 deletions(-) delete mode 100644 scripts/ci/after_script.sh delete mode 100644 scripts/ci/before_script.sh diff --git a/.travis.yml b/.travis.yml index f28c5fe65..85448e9ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,12 +37,8 @@ before_install: - bash ./scripts/ci/before_install.sh install: - bash ./scripts/ci/install.sh -before_script: - - bash ./scripts/ci/before_script.sh script: - bash ./scripts/ci/script.sh -after_script: - - bash ./scripts/ci/after_script.sh deploy: condition: "[[ $(python -c 'import sys; print(sys.version_info[0])') == '2' ]]" provider: releases diff --git a/scripts/ci/after_script.sh b/scripts/ci/after_script.sh deleted file mode 100644 index 6fe448d99..000000000 --- a/scripts/ci/after_script.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -set -x -set -e - -if [[ "$TRAVIS_OS_NAME" == "linux" && \ - "$(python -c 'import sys; print(sys.version_info[0])')" == "2" && \ - "$TRAVIS_PULL_REQUEST" == "false" && \ - "$TRAVIS_BRANCH" == "master" && \ - "$TRAVIS_SECURE_ENV_VARS" == "true" ]]; then - coverage xml - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT -fi diff --git a/scripts/ci/before_script.sh b/scripts/ci/before_script.sh deleted file mode 100644 index 0a7173f41..000000000 --- a/scripts/ci/before_script.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -set -x -set -e - -if [[ "$TRAVIS_OS_NAME" == "linux" && \ - "$(python -c 'import sys; print(sys.version_info[0])')" == "2" && \ - "$TRAVIS_PULL_REQUEST" == "false" && \ - "$TRAVIS_BRANCH" == "master" && \ - "$TRAVIS_SECURE_ENV_VARS" == "true" ]]; then - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - chmod +x ./cc-test-reporter - ./cc-test-reporter before-build -fi diff --git a/scripts/ci/script.sh b/scripts/ci/script.sh index 8fcfc970a..ad2a6b36f 100644 --- a/scripts/ci/script.sh +++ b/scripts/ci/script.sh @@ -5,6 +5,14 @@ set -e ./unittests.sh +if [[ "$TRAVIS_OS_NAME" == "linux" && \ + "$(python -c 'import sys; print(sys.version_info[0])')" == "2" && \ + "$TRAVIS_PULL_REQUEST" == "false" && \ + "$TRAVIS_BRANCH" == "master" && \ + "$TRAVIS_SECURE_ENV_VARS" == "true" ]]; then + codeclimate-test-reporter --token $CC_TEST_REPORTER_ID +fi + if [[ ! -z "$TRAVIS_TAG" ]]; then if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./scripts/build_macos.sh