Sha256: 30525d154bca93ee6480c7a693ad35e1d03d4d5263a950bdc6b3ae5ef43b78b8

Contents?: true

Size: 349 Bytes

Versions: 2

Compression:

Stored size: 349 Bytes

Contents

#!/usr/bin/env ruby

require "json"

File.read("coverage/.last_run.json").tap do |json|
  data = JSON.parse(json)
  coverage = [
    data.dig("result", "covered_percent").to_f,
    data.dig("result", "line").to_f
  ].max
  puts "Coverage: #{coverage}%"
  if coverage < 100
    puts "Coverage is below 100%! Exiting with error."
    exit 1
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rubocop-ipepe-0.2.5 bin/coveragecheck
rubocop-ipepe-0.2.0 bin/coveragecheck