diff --git a/.circleci/config.yml b/.circleci/config.yml index 20646fda..ba7333ab 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,7 +26,11 @@ jobs: - run: bundle install - run: gem install hound-cli - run: - command: bundle exec rspec --color --require spec_helper --format=doc --format progress $(circleci tests glob spec/**/*_spec.rb | circleci tests split) + command: | + bundle exec rspec --color --require spec_helper --profile 10 \ + --format progress --format documentation \ + --format RspecJunitFormatter --out test_results/rspec.xml \ + $(circleci tests glob spec/**/*_spec.rb | circleci tests split --split-by=timings) environment: RAILS_ENV: test RACK_ENV: test @@ -34,3 +38,5 @@ jobs: key: potassium-bundle-{{ .Branch }}-{{ epoch }} paths: - vendor/bundle + - store_test_results: + path: test_results diff --git a/CHANGELOG.md b/CHANGELOG.md index 71dcca59..5b86c7c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ Features: - Update Rails to 6.0.2 [#251](https://github.com/platanus/potassium/pull/251) - Improve specs performance [#259](https://github.com/platanus/potassium/pull/259) - Dasherize app name in docker compose related files [#261](https://github.com/platanus/potassium/pull/261) + - Split specs by timings in CircleCI [#263](https://github.com/platanus/potassium/pull/263) Fix: - Correctly use cache for bundle dependencies in CircleCI build [#244](https://github.com/platanus/potassium/pull/244) and [#258](https://github.com/platanus/potassium/pull/258) diff --git a/potassium.gemspec b/potassium.gemspec index 9da9b194..5c570521 100644 --- a/potassium.gemspec +++ b/potassium.gemspec @@ -22,6 +22,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency "pry", "~> 0.10.3" spec.add_development_dependency "rake", "~> 10.0" spec.add_development_dependency "rspec", "~> 3.4.0" + spec.add_development_dependency "rspec_junit_formatter" spec.add_development_dependency "rubocop", Potassium::RUBOCOP_VERSION spec.add_development_dependency "rubocop-rspec" spec.add_runtime_dependency "gems", "~> 0.8"