From f6d26154251d91d86e2ac16bd0f9d6c3f60844fd Mon Sep 17 00:00:00 2001
From: Chris Smith <cs24@sanger.ac.uk>
Date: Mon, 29 Oct 2018 10:45:36 +0000
Subject: [PATCH] Add config for codeclimate integration

---
 .codeclimate.yml | 11 +++++++++++
 .travis.yml      | 11 ++++++++++-
 2 files changed, 21 insertions(+), 1 deletion(-)
 create mode 100644 .codeclimate.yml

diff --git a/.codeclimate.yml b/.codeclimate.yml
new file mode 100644
index 0000000..ba08e39
--- /dev/null
+++ b/.codeclimate.yml
@@ -0,0 +1,11 @@
+---
+version: "2"
+plugins:
+  brakeman:
+    enabled: true
+  fixme:
+    enabled: true
+  reek:
+    enabled: true
+  rubocop:
+    enabled: true
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
index dd9161e..498412d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,6 +5,13 @@ cache: bundler
 rvm:
   - 2.4.1
 before_install: gem install bundler -v 1.16.4
+env:
+  global:
+    - CC_TEST_REPORTER_ID=b07859ceb064fed550f1ce8eb913053ad9b99271a9a0837bf94491262516214e
+before_script:
+  - 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
 branches:
   only:
     - devel
@@ -14,4 +21,6 @@ branches:
 install:
   - bundle install --jobs=3 --retry=3
 script:
-  - bundle exec rspec
\ No newline at end of file
+  - bundle exec rspec
+after_script:
+  - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
\ No newline at end of file