Fix gitaly bundle install flags
What does this MR do?
Fixes long running Gitaly set up during test. Saves about 68% of the set up time.
tmp/tests/gitaly
is deleted and recreated each time gitaly is set up.
The root cause is that bundle install
in tmp/tests/gitaly/ruby
was installing with BUNDLE_DEPLOYMENT: true
, which defaults to installing gems in vendor/bundle
instead of $GEM_HOME.
Before:
==> Setting up Gitaly...
Gitaly set up in 439.994758 seconds..
After:
==> Setting up Gitaly...
Gitaly set up in 140.915383 seconds...
Steps to test
- Delete test gitaly
rm -rf tmp/tests/gitaly
- Run any rspec test, which will set up fresh gitaly and uses gems from GEM_HOME
- Verify there is no gems installed in
tmp/tests/gitaly/ruby/vendor/bundle
- Simulate outdated gitaly by hard resetting to older commit
cd tmp/tests/gitaly && git reset HEAD~1 --hard
- Run rspec test again, which will set up gitaly, but does not reinstall gems.
- Verify there is no gems installed in
tmp/tests/gitaly/ruby/vendor/bundle
Edited by Albert