Skip to content

Commit c9a8642

Browse files
committed
add codeclimate coverage reports
1 parent 943f1b2 commit c9a8642

File tree

5 files changed

+43
-17
lines changed

5 files changed

+43
-17
lines changed

.travis.yml

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,25 @@ sudo: false
1515
script: "bundle exec rake $TASK"
1616

1717
env:
18-
- "TASK=test:core_and_plugins TILT=master"
19-
- "TASK=test:core_and_plugins TILT=1.3.7"
20-
- "TASK=test:core_and_plugins TILT=1.4.1"
21-
- "TASK=test:core_and_plugins TILT=2.0.1"
22-
- "TASK=test:rails RAILS=master"
23-
- "TASK=test:rails RAILS=3.1.12 TILT=1.3.4"
24-
- "TASK=test:rails RAILS=3.2.21 TILT=1.3.4"
25-
- "TASK=test:rails RAILS=4.0.13"
26-
- "TASK=test:rails RAILS=4.1.10"
27-
- "TASK=test:rails RAILS=4.2.1"
28-
- "TASK=test:sinatra SINATRA=master"
29-
- "TASK=test:sinatra SINATRA=1.3.6"
30-
- "TASK=test:sinatra SINATRA=1.4.6"
31-
- "TASK=bench"
32-
- "TASK=bench slow=1"
18+
global:
19+
# travis encrypt CODECLIMATE_REPO_TOKEN=???
20+
- secure: "a7sD9iwPJJn3Fj+mn62GAmy/PEguh3elrilsp1KS+WfDiCiIKD8Q5KG2Jv67DGcQAGI3dPWeh7+ZhZ/W7nEipwWUBmSvGYVeoF63y8j6mNRLeekqspj94l47hXyFePj9bCadY1b1/xY4lE1pMEU8eA8AOUHUqCSuH+Kk/MuvyLM="
21+
matrix:
22+
- "TASK=test:core_and_plugins TILT=master"
23+
- "TASK=test:core_and_plugins TILT=1.3.7"
24+
- "TASK=test:core_and_plugins TILT=1.4.1"
25+
- "TASK=test:core_and_plugins TILT=2.0.1"
26+
- "TASK=test:rails RAILS=master"
27+
- "TASK=test:rails RAILS=3.1.12 TILT=1.3.4"
28+
- "TASK=test:rails RAILS=3.2.21 TILT=1.3.4"
29+
- "TASK=test:rails RAILS=4.0.13"
30+
- "TASK=test:rails RAILS=4.1.10"
31+
- "TASK=test:rails RAILS=4.2.1"
32+
- "TASK=test:sinatra SINATRA=master"
33+
- "TASK=test:sinatra SINATRA=1.3.6"
34+
- "TASK=test:sinatra SINATRA=1.4.6"
35+
- "TASK=bench"
36+
- "TASK=bench slow=1"
3337

3438
matrix:
3539
exclude:

Gemfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ if RUBY_VERSION >= '2.2.0'
3737
gem 'test-unit', platforms: :mri
3838
end
3939

40-
if RUBY_ENGINE == 'rbx' && !ENV.key?('TRAVIS')
40+
if RUBY_ENGINE == 'rbx' && !ENV['TRAVIS']
4141
gem 'psych'
4242
end
4343

@@ -63,3 +63,7 @@ if ENV['TASK'] == 'bench'
6363
gem 'erubis'
6464
gem 'haml'
6565
end
66+
67+
if ENV['CODECLIMATE_REPO_TOKEN']
68+
gem 'codeclimate-test-reporter'
69+
end

test/core/helper.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# encoding: utf-8
22

3+
begin
4+
require 'codeclimate-test-reporter'
5+
CodeClimate::TestReporter.start
6+
rescue LoadError
7+
end
8+
39
require 'minitest/autorun'
410
require 'slim'
511
require 'slim/grammar'

test/literate/helper.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
begin
2+
require 'codeclimate-test-reporter'
3+
CodeClimate::TestReporter.start
4+
rescue LoadError
5+
end
6+
17
require 'slim'
28
require 'slim/logic_less'
39
require 'slim/translator'

test/rails/test/helper.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
begin
2+
require 'codeclimate-test-reporter'
3+
CodeClimate::TestReporter.start
4+
rescue LoadError
5+
end
6+
17
# Configure Rails Envinronment
28
ENV["RAILS_ENV"] = "test"
39

@@ -13,7 +19,7 @@ class ActionDispatch::IntegrationTest
1319

1420
def assert_xpath(xpath, message="Unable to find '#{xpath}' in response body.")
1521
assert_response :success, "Response type is not :success (code 200..299)."
16-
22+
1723
body = @response.body
1824
assert !body.empty?, "No response body found."
1925

0 commit comments

Comments
 (0)