Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache gems in testing using Expeditor gem caching #1173

Merged
merged 2 commits into from
May 12, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .expeditor/run_linux_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
#
# This script runs a passed in command, but first setups up the bundler caching on the repo

set -ue

export USER="root"
export LANG=C.UTF-8 LANGUAGE=C.UTF-8

echo "--- bundle install"

bundle config --local path vendor/bundle
bundle install --jobs=7 --retry=3

echo "+++ bundle exec task"
bundle exec $@
12 changes: 6 additions & 6 deletions .expeditor/verify.pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
expeditor:
cached_folders:
- vendor
steps:
- label: chefstyle-tests-ruby-2.7
command:
- export USER="root"
- bundle install --jobs=7 --retry=3
- bundle exec rake style
- .expeditor/run_linux_tests.sh rake style
expeditor:
executor:
docker:
image: ruby:2.7-buster
# This tests that our verify.rb script (and dependencies) can successfully test components included in CW
- label: component-test-tests-ruby-2.7
command:
- export USER="root"
- bundle install --jobs=7 --retry=3
- bundle exec rspec omnibus/verification
- .expeditor/run_linux_tests.sh rspec omnibus/verification
expeditor:
executor:
docker:
Expand Down
8 changes: 1 addition & 7 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,4 @@ group :development do
# enable tests for the verification behavior in omnibus/verification
gem "chef-cli"
gem "rspec"
end

instance_eval(ENV["GEMFILE_MOD"]) if ENV["GEMFILE_MOD"]

# If you want to load debugging tools into the bundle exec sandbox,
# add these additional dependencies into Gemfile.local
eval_gemfile(__FILE__ + ".local") if File.exist?(__FILE__ + ".local")
end