-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
24 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,28 @@ | ||
require 'simplecov' | ||
require 'codecov' | ||
called_from_cli = true | ||
begin | ||
OpenStudio.getOpenStudioCLI | ||
rescue | ||
called_from_cli = false | ||
end | ||
|
||
if not called_from_cli # cli can't load codecov gem | ||
require 'simplecov' | ||
require 'codecov' | ||
|
||
# save to CircleCI's artifacts directory if we're on CircleCI | ||
if ENV['CI'] | ||
if ENV['CIRCLE_ARTIFACTS'] | ||
dir = File.join(ENV['CIRCLE_ARTIFACTS'], "coverage") | ||
SimpleCov.coverage_dir(dir) | ||
# save to CircleCI's artifacts directory if we're on CircleCI | ||
if ENV['CI'] | ||
if ENV['CIRCLE_ARTIFACTS'] | ||
dir = File.join(ENV['CIRCLE_ARTIFACTS'], "coverage") | ||
SimpleCov.coverage_dir(dir) | ||
end | ||
SimpleCov.formatter = SimpleCov::Formatter::Codecov | ||
else | ||
SimpleCov.coverage_dir("coverage") | ||
end | ||
SimpleCov.formatter = SimpleCov::Formatter::Codecov | ||
SimpleCov.start | ||
else | ||
SimpleCov.coverage_dir("coverage") | ||
SimpleCov.start | ||
end | ||
require 'minitest/autorun' | ||
require 'minitest/reporters' | ||
|
||
Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new # spec-like progress | ||
require 'minitest/autorun' | ||
require 'minitest/reporters' | ||
|
||
Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new # spec-like progress | ||
end |