A danger plugin for reporting compose compiler metrics
gem install danger-compose_compiler_metrics
Dir.glob('**/compose_compiler_metrics').each do |report_dir|
next if report_dir.include?("vendor/bundle")
compose_compiler_metrics.report_difference(report_dir, "#{report_dir}_baseline")
end
I recommend a use case that compare the metrics report in the feature branch with the metrics report in the main branch. Following is example of implementation using Github Actions.
https://github.com/tomorrowkey/danger-compose_compiler_metrics-example/pull/1
Dir.glob('**/compose_compiler_metrics').each do |report_dir|
next if report_dir.include?("vendor/bundle")
compose_compiler_metrics.report(report_dir)
end
bundle install
to setup dependencies.bundle exec rake spec
to run the tests.bundle exec guard
to automatically have tests run as you make changes.