From dc6858504a927513dc2baef5899e812c4d921c2c Mon Sep 17 00:00:00 2001 From: Jordon Bedwell Date: Sun, 10 Jan 2016 11:02:47 -0600 Subject: [PATCH 1/4] Make .travis.yml a bit more readable. --- .travis.yml | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/.travis.yml b/.travis.yml index 58980f41..0fa982a1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,41 +1,46 @@ -language: ruby cache: bundler +script: script/cibuild +before_script: bundle update +language: ruby sudo: false + rvm: - 2.2 - 2.1 - 2.0 -- ruby-head - jruby-9.0.3.0 +- ruby-head + matrix: fast_finish: true allow_failures: + - rvm: jruby-9.0.3.0 - rvm: ruby-head - - rvm: jruby-9.0.3.0 exclude: - - rvm: jruby-9.0.3.0 - env: TEST_SUITE=cucumber + - rvm: jruby-9.0.3.0 + env: TEST_SUITE=cucumber + env: matrix: - - TEST_SUITE=test - - TEST_SUITE=cucumber + - TEST_SUITE=test + - TEST_SUITE=cucumber + branches: only: - - master -before_script: bundle update -script: script/cibuild + - master + notifications: irc: - on_success: change - on_failure: change - channels: - - irc.freenode.org#jekyll - template: - - "%{repository}#%{build_number} (%{branch}) %{message} %{build_url}" + template: "%{repository}#%{build_number} (%{branch}) %{message} %{build_url}" + channels: irc.freenode.org#jekyll + email: recipients: - jordon@envygeeks.io - on_success: never - on_failure: always + slack: - secure: dNdKk6nahNURIUbO3ULhA09/vTEQjK0fNbgjVjeYPEvROHgQBP1cIP3AJy8aWs8rl5Yyow4YGEilNRzKPz18AsFptVXofpwyqcBxaCfmHP809NX5PHBaadydveLm+TNVao2XeLXSWu+HUNAYO1AanCUbJSEyJTju347xCBGzESU= + secure: "\ + dNdKk6nahNURIUbO3ULhA09/vTEQjK0fNbgjVjeYPEvROHgQBP1cIP3AJy8aWs8rl5Yyow4Y\ + GEilNRzKPz18AsFptVXofpwyqcBxaCfmHP809NX5PHBaadydveLm+TNVao2XeLXSWu+HUNAY\ + O1AanCUbJSEyJTju347xCBGzESU=\ + " From 86ed09ffddb182c5be3551e5032d21974c606c72 Mon Sep 17 00:00:00 2001 From: Jordon Bedwell Date: Sun, 10 Jan 2016 11:04:53 -0600 Subject: [PATCH 2/4] Enable CodeClimate coverage. --- .travis.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.travis.yml b/.travis.yml index 0fa982a1..7777656d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,3 +44,12 @@ notifications: GEilNRzKPz18AsFptVXofpwyqcBxaCfmHP809NX5PHBaadydveLm+TNVao2XeLXSWu+HUNAY\ O1AanCUbJSEyJTju347xCBGzESU=\ " + +addons: + code_climate: + repo_token: + secure: "\ + mAuvDu+nrzB8dOaLqsublDGt423mGRyZYM3vsrXh4Tf1sT+L1PxsRzU4gLmcV27HtX2Oq9\ + DA4vsRURfABU0fIhwYkQuZqEcA3d8TL36BZcGEshG6MQ2AmnYsmFiTcxqV5bmlElHEqQuT\ + 5SUFXLafgZPBnL0qDwujQcHukID41sE=\ + " From 8669077daf769099ff6c6c9b31676424f0564732 Mon Sep 17 00:00:00 2001 From: Jordon Bedwell Date: Sun, 10 Jan 2016 11:07:00 -0600 Subject: [PATCH 3/4] Add coverage badge. --- README.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/README.markdown b/README.markdown index d8c621d1..9ee529f3 100644 --- a/README.markdown +++ b/README.markdown @@ -3,6 +3,7 @@ [![Gem Version](https://img.shields.io/gem/v/jekyll.svg)](https://rubygems.org/gems/jekyll) [![Build Status](https://img.shields.io/travis/jekyll/jekyll/master.svg)](https://travis-ci.org/jekyll/jekyll) [![Code Climate](https://img.shields.io/codeclimate/github/jekyll/jekyll.svg)](https://codeclimate.com/github/jekyll/jekyll) +[![Test Coverage](https://codeclimate.com/github/jekyll/jekyll/badges/coverage.svg)](https://codeclimate.com/github/jekyll/jekyll/coverage) [![Dependency Status](https://gemnasium.com/jekyll/jekyll.svg)](https://gemnasium.com/jekyll/jekyll) [![Security](https://hakiri.io/github/jekyll/jekyll/master.svg)](https://hakiri.io/github/jekyll/jekyll/master) From 55423e344ea8249366ae94312a6815510f78cbcc Mon Sep 17 00:00:00 2001 From: Jordon Bedwell Date: Sun, 10 Jan 2016 11:18:46 -0600 Subject: [PATCH 4/4] Add CodeClimate to the testing stuff. --- Gemfile | 1 + test/helper.rb | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index b253e8bf..04bd73bd 100644 --- a/Gemfile +++ b/Gemfile @@ -17,6 +17,7 @@ group :test do gem 'simplecov', '~> 0.9' gem 'jekyll_test_plugin' gem 'jekyll_test_plugin_malicious' + gem "codeclimate-test-reporter" gem 'minitest-reporters' gem 'minitest-profile' gem 'rspec-mocks' diff --git a/test/helper.rb b/test/helper.rb index 281f6871..32363369 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -2,11 +2,14 @@ def jruby? defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby' end -unless ENV['TRAVIS'] - require File.expand_path('../simplecov_custom_profile', __FILE__) - SimpleCov.start('gem') do - add_filter "/vendor/bundle" +if ENV["CI"] + require "codeclimate-test-reporter" + CodeClimate::TestReporter.start +else + require File.expand_path("../simplecov_custom_profile", __FILE__) + SimpleCov.start "gem" do add_filter "/vendor/gem" + add_filter "/vendor/bundle" add_filter ".bundle" end end