From 999872584b34f1696997047a805a8df49777263b Mon Sep 17 00:00:00 2001 From: Marc Anguera Insa Date: Thu, 14 Mar 2019 22:16:19 +0100 Subject: [PATCH 1/2] Report code coverage (via Code Climate) in CI --- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index 10f0115d4..93d26de14 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,19 @@ +env: + global: + - CC_TEST_REPORTER_ID=XXXXXXX language: ruby cache: bundler bundler_args: '--without development' env: DATABASE_URL=postgres://postgres@localhost/timeoverflow_test before_script: - bundle exec rake db:setup + - 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 # allow elasticsearch to be ready - https://docs.travis-ci.com/user/database-setup/#ElasticSearch - sleep 10 +after_script: + - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT services: - elasticsearch addons: From ad146027dab0e5bd522e47ef2cb995e3b90cba3a Mon Sep 17 00:00:00 2001 From: Marc Anguera Insa Date: Fri, 22 Mar 2019 18:47:34 +0100 Subject: [PATCH 2/2] add CC_TEST_REPORTER_ID for travis + add coverage badge --- .travis.yml | 8 ++++---- README.md | 7 ++++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 93d26de14..730632329 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,10 @@ -env: - global: - - CC_TEST_REPORTER_ID=XXXXXXX language: ruby cache: bundler bundler_args: '--without development' -env: DATABASE_URL=postgres://postgres@localhost/timeoverflow_test +env: + global: + - DATABASE_URL=postgres://postgres@localhost/timeoverflow_test + - CC_TEST_REPORTER_ID=025bc15a0fa9afa52d86ee24fea845cf1d363f48a466bcf2cef8ab80c29acb28 before_script: - bundle exec rake db:setup - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter diff --git a/README.md b/README.md index 564c5ef6d..42e7a523c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,9 @@ -# TimeOverflow [![View performance data on Skylight](https://badges.skylight.io/problem/grDTNuzZRnyu.svg)](https://oss.skylight.io/app/applications/grDTNuzZRnyu) [![Build Status](https://travis-ci.org/coopdevs/timeoverflow.svg)](https://travis-ci.org/coopdevs/timeoverflow) [![Code Climate](https://codeclimate.com/github/timeoverflow/timeoverflow/badges/gpa.svg)](https://codeclimate.com/github/timeoverflow/timeoverflow) +# TimeOverflow +[![View performance data on Skylight](https://badges.skylight.io/problem/grDTNuzZRnyu.svg)](https://oss.skylight.io/app/applications/grDTNuzZRnyu) +[![Build Status](https://travis-ci.org/coopdevs/timeoverflow.svg)](https://travis-ci.org/coopdevs/timeoverflow) +[![Maintainability](https://api.codeclimate.com/v1/badges/f82c6d98a2441c84f2ef/maintainability)](https://codeclimate.com/github/coopdevs/timeoverflow/maintainability) +[![Test Coverage](https://api.codeclimate.com/v1/badges/f82c6d98a2441c84f2ef/test_coverage)](https://codeclimate.com/github/coopdevs/timeoverflow/test_coverage) + #### www.timeoverflow.org :globe_with_meridians: Read this [in English](docs/README.en.md)