Tbpgr Blog

Employee Experience Engineer tbpgr(てぃーびー) のブログ

Circle CI で SimpleCov のカバレッジレポートを出力する

f:id:tbpg:20161014224140p:plain

Circle CI で SimpleCov のカバレッジレポートを出力します

サンプル

spec_helper.rb

require 'simplecov'

if ENV['CIRCLE_ARTIFACTS']
  dir = File.join(ENV['CIRCLE_ARTIFACTS'], 'coverage')
  SimpleCov.coverage_dir(dir)
end

SimpleCov.start

circle.yml

machine:
  timezone:
    Asia/Tokyo
  ruby:
    version: 2.3.1
test:
  pre:
    - bundle exec rspec

結果

  • Artifacts

f:id:tbpg:20161014224148p:plain

  • レポート

f:id:tbpg:20161014224157p:plain

  • レポート(個別ファイル)

f:id:tbpg:20161014224203p:plain

関連資料