diff options
| author | realtradam <[email protected]> | 2021-06-10 13:29:47 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2021-06-10 13:29:47 -0400 |
| commit | f79d08089a49ca0f2aa2318b1a13ccabda2d9aaa (patch) | |
| tree | 3062d5a9f98d48cac9dcc8f2025507f5f76b7d66 | |
| parent | 9db98b8955125584debf17d7204715a1149578c5 (diff) | |
| download | FelECS-f79d08089a49ca0f2aa2318b1a13ccabda2d9aaa.tar.gz FelECS-f79d08089a49ca0f2aa2318b1a13ccabda2d9aaa.zip | |
added codeclimate rake task
| -rw-r--r-- | .gitignore | 9 | ||||
| -rw-r--r-- | Rakefile | 13 | ||||
| -rw-r--r-- | codeclimate/env.rb | 1 | ||||
| -rw-r--r-- | codeclimate/export-coverage.rb | 16 | ||||
| -rw-r--r-- | tests/signatures_test.rb | 15 |
5 files changed, 38 insertions, 16 deletions
@@ -1,2 +1,11 @@ +# Ignore generated coverage coverage/* coverage + +# Ignore yard metadata +.yardoc/* +.yardoc + +# Ignore codeclimate executable and env vars +codeclimate/env.rb +codeclimate/test-reporter-latest-linux-amd64 @@ -1,8 +1,19 @@ require 'rake/testtask' require 'yard' +require_relative './codeclimate/export-coverage' - +namespace :coverage do + desc "format coverage so it can be exported to codeclimate" + task :format do + ReportCoverage.format + end + + desc "upload coverage using your key" + task :upload do + ReportCoverage.upload + end +end YARD::Rake::YardocTask.new do |t| t.files = ['component_manager.rb', 'entity_manager.rb', 'felflame.rb'] diff --git a/codeclimate/env.rb b/codeclimate/env.rb new file mode 100644 index 0000000..59129ab --- /dev/null +++ b/codeclimate/env.rb @@ -0,0 +1 @@ +ENV['CC_TEST_REPORTER_ID'] = '' diff --git a/codeclimate/export-coverage.rb b/codeclimate/export-coverage.rb new file mode 100644 index 0000000..3b99620 --- /dev/null +++ b/codeclimate/export-coverage.rb @@ -0,0 +1,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 diff --git a/tests/signatures_test.rb b/tests/signatures_test.rb deleted file mode 100644 index 9d1bd9a..0000000 --- a/tests/signatures_test.rb +++ /dev/null @@ -1,15 +0,0 @@ -require 'minitest/autorun' -require_relative '_test_helper.rb' - -require_relative '../signatures.rb' - -describe 'Sample' do - before do - #setup vars here - end - - it 'does something' do - _(4).must_equal 4 - #_(@thing).mustequal 'something - end -end |
