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

ci: fix ignored errors within appraisal loop #1103

Merged
merged 7 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
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
9 changes: 8 additions & 1 deletion .github/actions/test_gem/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ runs:
ruby-version: "${{ inputs.ruby }}"
bundler: "latest"
working-directory: "${{ steps.setup.outputs.gem_dir }}"
# 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: |
# 🛠️😭 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
Expand All @@ -100,7 +107,7 @@ runs:
echo "::group::🔎 Appraising ${i}"
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
BUNDLE_GEMFILE=gemfiles/${i}.gemfile bundle exec rake test || exit
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would using bundle install --path using a relative vendor directory address the permissions issue?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably! I cannot confirm a fix locally, so I'll throw another commit on here changing the workaround from the separate chmod step to including a --path switch here. Then I'll push that up and see how CI reacts.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bundle install --path is deprecated, so I went with bundle config path in d7ba5f4. Now watching CI. ⌛

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope. bundle config path didn't work for bundler's filesystem permission check. I'm going to revert that commit and go back to chmod.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simi any tips here?

echo "::endgroup::"
done
else
Expand Down
20 changes: 14 additions & 6 deletions instrumentation/gruf/Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,22 @@
#
# SPDX-License-Identifier: Apache-2.0

appraise 'gruf-2.17' do
gem 'gruf', '~> 2.17.0'
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('3.3')
appraise 'gruf-2.17' do
gem 'gruf', '~> 2.17.0'
end

appraise 'gruf-2.18' do
gem 'gruf', '~> 2.18.0'
end
end

appraise 'gruf-2.18' do
gem 'gruf', '~> 2.18.0'
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('3.4')
appraise 'gruf-2.19' do
gem 'gruf', '~> 2.19.0'
end
end

appraise 'gruf-2.19' do
gem 'gruf', '~> 2.19.0'
appraise 'gruf-latest' do
gem 'gruf'
end
Loading