Skip to content

Commit

Permalink
feat(ci): split specs by timings for parallel run
Browse files Browse the repository at this point in the history
  • Loading branch information
rjherrera committed Feb 3, 2020
1 parent e1f133d commit 5ddccfe
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,17 @@ 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
- save_cache:
key: potassium-bundle-{{ .Branch }}-{{ epoch }}
paths:
- vendor/bundle
- store_test_results:
path: test_results
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions potassium.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 5ddccfe

Please sign in to comment.