From d0d5f25e637c5906052c4827f5e76c2641bb8779 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Sat, 3 Dec 2016 17:20:03 +0100 Subject: [PATCH] added coveralls.io --- Gemfile | 1 + README.md | 2 +- spec/rails_helper.rb | 1 + test/test_helper.rb | 7 ++++++- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 39a5805e2..585a4a96b 100644 --- a/Gemfile +++ b/Gemfile @@ -108,6 +108,7 @@ group :development, :test do gem 'pre-commit' gem 'rubocop' gem 'coffeelint' + gem 'coveralls', require: false # changelog generation gem 'github_changelog_generator' diff --git a/README.md b/README.md index 76ee03f17..60b151bc4 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ You're going to love Zammad! ## Statusbadges - Build: [![Build Status](https://travis-ci.org/zammad/zammad.svg?branch=develop)](https://travis-ci.org/zammad/zammad) -- Code: [![Code Climate](https://codeclimate.com/github/zammad/zammad/badges/gpa.svg)](https://codeclimate.com/github/zammad/zammad) +- Code: [![Code Climate](https://codeclimate.com/github/zammad/zammad/badges/gpa.svg)](https://codeclimate.com/github/zammad/zammad) [![Coverage Status](https://coveralls.io/repos/github/zammad/zammad/badge.svg)](https://coveralls.io/github/zammad/zammad) - Docs: [![Documentation Status](https://readthedocs.org/projects/zammad/badge/?version=latest)](https://docs.zammad.org) - Docker Image: [![](https://images.microbadger.com/badges/image/zammad/zammad.svg)](https://microbadger.com/images/zammad/zammad) [![](https://images.microbadger.com/badges/version/zammad/zammad.svg)](https://hub.docker.com/r/zammad/zammad/) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 0c2dfd638..7c8bbaf6a 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -1,6 +1,7 @@ # This file is copied to spec/ when you run 'rails generate rspec:install' ENV['RAILS_ENV'] ||= 'test' require File.expand_path('../../config/environment', __FILE__) + # Prevent database truncation if the environment is production abort('The Rails environment is running in production mode!') if Rails.env.production? require 'spec_helper' diff --git a/test/test_helper.rb b/test/test_helper.rb index 497dc0870..183015216 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -4,6 +4,8 @@ require 'rails/test_help' require 'cache' require 'simplecov' require 'simplecov-rcov' +require 'coveralls' +Coveralls.wear!('rails') #ActiveSupport::TestCase.test_order = :sorted @@ -14,7 +16,10 @@ class ActiveSupport::TestCase # # Note: You'll currently still have to declare fixtures explicitly in integration tests # -- they do not yet inherit this setting - SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter + SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[ + SimpleCov::Formatter::RcovFormatter, + Coveralls::SimpleCov::Formatter + ] SimpleCov.start fixtures :all