summaryrefslogtreecommitdiffhomepage
path: root/codeclimate/export-coverage.rb
blob: 3b996206eaafff27ef60ca6f16864bfe95fac48a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require_relative 'env'


class ReportCoverage
  class <<self
    def format
      puts ENV['CC_TEST_REPORTER_ID']
      puts `./codeclimate/test-reporter-latest-linux-amd64 format-coverage -t simplecov`
    end

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