Merge branch 'fail_on_missing_coverage' into 'master'

Fail on missing coverage

This will make the build more reliable and meaningful.

Cucumber requirements are addressed at #15. Another option is to require cucumber coverage above the current coverage.

See merge request !26
parents 55cabd7d 1bf97ed3
Pipeline #3687091 passed with stage
in 8 minutes and 41 seconds
require 'simplecov'
SimpleCov.coverage_dir("coverage/cucumber")
SimpleCov.minimum_coverage(90.67) if ENV["CI"] == 'true' # FIXME: increase to 100%
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
# It is recommended to regenerate this file in the future when you upgrade to a
......
require 'simplecov'
SimpleCov.coverage_dir("coverage/rspec")
# Minimum coverage is only desired on CI tools when building the environment. CI is a
# default environment variable used by GitlabCI (and Travis). For reference, see here:
# http://docs.gitlab.com/ce/ci/variables/README.html
SimpleCov.minimum_coverage(100) if ENV["CI"] == 'true'
# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV['RAILS_ENV'] ||= 'test'
......
......@@ -174,13 +174,13 @@ Teaspoon.configure do |config|
# Assets to be ignored when generating coverage reports. Accepts an array of filenames or regular expressions. The
# default excludes assets from vendor, gems and support libraries.
#coverage.ignore = [%r{/lib/ruby/gems/}, %r{/vendor/assets/}, %r{/support/}, %r{/(.+)_helper.}]
coverage.ignore += [%r{/tmp/}]
# Various thresholds requirements can be defined, and those thresholds will be checked at the end of a run. If any
# aren't met the run will fail with a message. Thresholds can be defined as a percentage (0-100), or nil.
#coverage.statements = nil
#coverage.functions = nil
#coverage.branches = nil
#coverage.lines = nil
coverage.lines = 100 if ENV["CI"] == 'true'
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment