Skip to content

Commit

Permalink
Revert "squash: use a separate cache key"
Browse files Browse the repository at this point in the history
This reverts commit 78cb4d2.
  • Loading branch information
arielvalentin committed Jan 30, 2025
1 parent 78cb4d2 commit ecc88cb
Show file tree
Hide file tree
Showing 59 changed files with 85 additions and 65 deletions.
44 changes: 26 additions & 18 deletions .github/actions/test_gem/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ runs:
# of the benefits of bundler caching.
rm -f "${dir}/Gemfile.lock"
echo "cache_key=cruby" >> $GITHUB_OUTPUT
echo "cache_key=mri" >> $GITHUB_OUTPUT
if [[ "${{ inputs.ruby }}" == "jruby" ]]; then
echo "cache_key=jruby" >> $GITHUB_OUTPUT
elif [[ "${{ inputs.ruby }}" == "truffleruby" ]]; then
Expand All @@ -80,49 +80,57 @@ runs:
shell: bash
run: sudo apt update && sudo apt install -y imagemagick

# Install ruby and bundle dependencies and cache!
# ...but not for appraisals, sadly.
- name: Install Ruby ${{ inputs.ruby }} with dependencies
if: "${{ steps.setup.outputs.appraisals == 'false' }}"
uses: ruby/setup-ruby@v1.214.0
with:
ruby-version: "${{ inputs.ruby }}"
working-directory: "${{ steps.setup.outputs.gem_dir }}"
bundler: "latest"
bundler-cache: true
cache-version: "${{ inputs.ruby }}-${{ steps.setup.outputs.cache_key }}"

# If we're using appraisals, do it all manually.
- name: Install Ruby ${{ inputs.ruby }} without dependencies
if: "${{ steps.setup.outputs.appraisals == 'true' }}"
uses: ruby/setup-ruby@v1.214.0
with:
bundler: "latest"
ruby-version: "${{ inputs.ruby }}"
bundler: "latest"
working-directory: "${{ steps.setup.outputs.gem_dir }}"

- name: Install dependencies
# Perms workaround. See https://github.com/actions/runner-images/issues/10215
- name: Fix GEM_HOME permissions on GitHub Actions Runner
if: "${{ steps.setup.outputs.appraisals == 'true' }}"
shell: bash
run: |
echo "::group:: 💎 Install dependencies and generate appraisals 💎"
bundle install
echo "::endgroup::"
working-directory: "${{ steps.setup.outputs.gem_dir }}"

# 🛠️😭 Fix GEM_HOME permissions 😭🛠️
chmod -R o-w $(gem env home)
- name: Install dependencies and generate appraisals
if: "${{ steps.setup.outputs.appraisals == 'true' }}"
shell: bash
run: |
echo "::group:: 💎 Install dependencies and generate appraisals 💎"
# 💎 Install dependencies and generate appraisals 💎
bundle install --quiet --jobs=3 --retry=4
bundle exec appraisal clean
bundle exec appraisal generate
echo "::endgroup::"
working-directory: "${{ steps.setup.outputs.gem_dir }}"

- name: Test Gem
shell: bash
run: |
# 🍿 Test Gem 🍿
if [[ -f "Appraisals" ]]; then
for i in `bundle exec appraisal list | sed 's/-/_/g' `; do
echo "::group::🔎 Appraising ${i}"
bundle install --gemfile=gemfiles/${i}.gemfile --jobs=3 --retry=4
bundle exec --gemfile=gemfiles/${i}.gemfile rake test
BUNDLE_GEMFILE=gemfiles/${i}.gemfile bundle install --quiet --jobs=3 --retry=4 && \
BUNDLE_GEMFILE=gemfiles/${i}.gemfile bundle show && \
BUNDLE_GEMFILE=gemfiles/${i}.gemfile bundle exec rake test || exit
echo "::endgroup::"
done
else
echo "::group::🔎 Running Tests Standalone"
bundle exec rake test
echo "::endgroup::"
fi
working-directory: "${{ steps.setup.outputs.gem_dir }}"
env:
Expand Down
2 changes: 1 addition & 1 deletion .instrumentation_generator/templates/gemspec.tt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-base', '~> <%= instrumentation_base_version %>'

spec.add_development_dependency 'appraisal', '~> 2.5'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.0'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ index 42c5ecba..74fcc743 100644
--- a/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec
+++ b/propagator/ottrace/opentelemetry-propagator-ottrace.gemspec
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'rake', '~> 13.0'
- spec.add_development_dependency 'rubocop', '~> 1.50.0'
Expand All @@ -407,7 +407,7 @@ index e29acbfc..85622d25 100644
--- a/propagator/xray/opentelemetry-propagator-xray.gemspec
+++ b/propagator/xray/opentelemetry-propagator-xray.gemspec
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'rake', '~> 13.0'
- spec.add_development_dependency 'rubocop', '~> 1.50.0'
Expand Down
1 change: 1 addition & 0 deletions helpers/mysql/opentelemetry-helpers-mysql.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-api', '~> 1.0'
spec.add_dependency 'opentelemetry-common', '~> 0.21'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
spec.add_development_dependency 'rake', '~> 13.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Gem::Specification.new do |spec|

spec.add_dependency 'opentelemetry-common', '~> 0.21'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
spec.add_development_dependency 'rake', '~> 13.0'
Expand Down
2 changes: 1 addition & 1 deletion helpers/sql/opentelemetry-helpers-sql.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-api', '~> 1.4.0'

spec.add_development_dependency 'appraisal', '~> 2.5'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
spec.add_development_dependency 'rake', '~> 13.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.23.0'

spec.add_development_dependency 'appraisal', '~> 2.5'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-rack', '~> 0.21'

spec.add_development_dependency 'appraisal', '~> 2.5'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.23.0'

spec.add_development_dependency 'appraisal', '~> 2.5'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.23.0'

spec.add_development_dependency 'appraisal', '~> 2.5'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Gem::Specification.new do |spec|

spec.add_development_dependency 'active_model_serializers', '>= 0.10.0'
spec.add_development_dependency 'appraisal', '~> 2.5'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.23.0'

spec.add_development_dependency 'appraisal', '~> 2.5'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.23.0'

spec.add_development_dependency 'appraisal', '~> 2.5'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Gem::Specification.new do |spec|

spec.add_development_dependency 'activesupport'
spec.add_development_dependency 'appraisal', '~> 2.5'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Gem::Specification.new do |spec|

spec.add_development_dependency 'active_model_serializers'
spec.add_development_dependency 'activesupport'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'rake', '~> 13.0'
spec.add_development_dependency 'rubocop', '~> 1.71.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.23.0'

spec.add_development_dependency 'appraisal', '~> 2.5'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.23.0'

spec.add_development_dependency 'appraisal', '~> 2.5'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-common', '~> 0.21'
spec.add_dependency 'opentelemetry-registry', '~> 0.1'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
spec.add_development_dependency 'rake', '~> 13.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.23.0'

spec.add_development_dependency 'appraisal', '~> 2.5'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.23.0'

spec.add_development_dependency 'appraisal', '~> 2.5'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.23.0'

spec.add_development_dependency 'appraisal', '~> 2.5'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.23.0'

spec.add_development_dependency 'appraisal', '~> 2.5'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.23.0'

spec.add_development_dependency 'appraisal', '~> 2.5'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.23.0'

spec.add_development_dependency 'appraisal', '~> 2.5'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.23.0'

spec.add_development_dependency 'appraisal', '~> 2.5'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Gem::Specification.new do |spec|

spec.add_development_dependency 'activesupport'
spec.add_development_dependency 'appraisal', '~> 2.5'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.0'
spec.add_development_dependency 'opentelemetry-test-helpers'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.23.0'

spec.add_development_dependency 'appraisal', '~> 2.5'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.23.0'

spec.add_development_dependency 'appraisal', '~> 2.5'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'google-protobuf', '~> 4.29'
spec.add_development_dependency 'grpc-tools', '~> 1.64'
spec.add_development_dependency 'minitest', '~> 5.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.23.0'

spec.add_development_dependency 'appraisal', '~> 2.5'
spec.add_development_dependency 'bundler', '>= 1.17'
spec.add_development_dependency 'grpc_mock'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.23.0'

spec.add_development_dependency 'appraisal', '~> 2.5'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.23.0'

spec.add_development_dependency 'appraisal', '~> 2.5'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.23.0'

spec.add_development_dependency 'appraisal', '~> 2.5'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.23.0'

spec.add_development_dependency 'appraisal', '~> 2.5'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.23.0'

spec.add_development_dependency 'appraisal', '~> 2.5'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.23.0'

spec.add_development_dependency 'appraisal', '~> 2.5'

spec.add_development_dependency 'bundler', '~> 2.4'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.1'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
Expand Down
Loading

0 comments on commit ecc88cb

Please sign in to comment.