summaryrefslogtreecommitdiffhomepage
path: root/codeclimate/export-coverage.rb
blob: 74b0cbdb3176f52d6f427c2dceb5c72f762b0af5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

require_relative 'env'

class ReportCoverage
  class << self
    def format
      puts
      puts 'Formatting Coverage...'
      puts `./codeclimate/test-reporter-latest-linux-amd64 format-coverage -t simplecov`
    end

    def upload
      puts `./codeclimate/test-reporter-latest-linux-amd64 upload-coverage --id #{ENV['CC_TEST_REPORTER_ID']}`
    end
  end
end