57
57
# of the benefits of bundler caching.
58
58
rm -f "${dir}/Gemfile.lock"
59
59
60
- echo "cache_key=mri " >> $GITHUB_OUTPUT
60
+ echo "cache_key=cruby " >> $GITHUB_OUTPUT
61
61
if [[ "${{ inputs.ruby }}" == "jruby" ]]; then
62
62
echo "cache_key=jruby" >> $GITHUB_OUTPUT
63
63
elif [[ "${{ inputs.ruby }}" == "truffleruby" ]]; then
@@ -80,57 +80,49 @@ runs:
80
80
shell : bash
81
81
run : sudo apt update && sudo apt install -y imagemagick
82
82
83
- # Install ruby and bundle dependencies and cache!
84
- # ...but not for appraisals, sadly.
85
- - name : Install Ruby ${{ inputs.ruby }} with dependencies
86
- if : " ${{ steps.setup.outputs.appraisals == 'false' }}"
87
-
88
- with :
89
- ruby-version : " ${{ inputs.ruby }}"
90
- working-directory : " ${{ steps.setup.outputs.gem_dir }}"
91
- bundler : " latest"
92
- bundler-cache : true
93
- cache-version : " ${{ inputs.ruby }}-${{ steps.setup.outputs.cache_key }}"
94
-
95
83
# If we're using appraisals, do it all manually.
96
84
- name : Install Ruby ${{ inputs.ruby }} without dependencies
97
- if : " ${{ steps.setup.outputs.appraisals == 'true' }}"
98
85
99
86
with :
87
+ bundler : " latest"
100
88
ruby-version : " ${{ inputs.ruby }}"
101
- bundler : " latest"
102
89
working-directory : " ${{ steps.setup.outputs.gem_dir }}"
103
- # Perms workaround. See https://github.com/actions/runner-images/issues/10215
104
- - name : Fix GEM_HOME permissions on GitHub Actions Runner
105
- if : " ${{ steps.setup.outputs.appraisals == 'true' }}"
90
+
91
+ - name : Install dependencies
106
92
shell : bash
107
93
run : |
108
- # 🛠️😭 Fix GEM_HOME permissions 😭🛠️
109
- chmod -R o-w $(gem env home)
94
+ echo "::group:: 💎 Install dependencies and generate appraisals 💎"
95
+ bundle install
96
+
97
+ echo "::endgroup::"
98
+ working-directory : " ${{ steps.setup.outputs.gem_dir }}"
99
+
110
100
- name : Install dependencies and generate appraisals
111
101
if : " ${{ steps.setup.outputs.appraisals == 'true' }}"
112
102
shell : bash
113
103
run : |
114
- # 💎 Install dependencies and generate appraisals 💎
115
- bundle install --quiet --jobs=3 --retry=4
104
+ echo "::group:: 💎 Install dependencies and generate appraisals 💎"
105
+
116
106
bundle exec appraisal clean
117
107
bundle exec appraisal generate
108
+
109
+ echo "::endgroup::"
118
110
working-directory : " ${{ steps.setup.outputs.gem_dir }}"
119
111
120
112
- name : Test Gem
121
113
shell : bash
122
114
run : |
123
- # 🍿 Test Gem 🍿
124
115
if [[ -f "Appraisals" ]]; then
125
116
for i in `bundle exec appraisal list | sed 's/-/_/g' `; do
126
117
echo "::group::🔎 Appraising ${i}"
127
- BUNDLE_GEMFILE=gemfiles/${i}.gemfile bundle install --quiet --jobs=3 --retry=4 && \
128
- BUNDLE_GEMFILE=gemfiles/${i}.gemfile bundle show && \
129
- BUNDLE_GEMFILE=gemfiles/${i}.gemfile bundle exec rake test || exit
118
+ bundle install --gemfile=gemfiles/${i}.gemfile --jobs=3 --retry=4
119
+ bundle exec --gemfile=gemfiles/${i}.gemfile rake test
130
120
echo "::endgroup::"
131
121
done
132
122
else
123
+ echo "::group::🔎 Running Tests Standalone"
133
124
bundle exec rake test
125
+ echo "::endgroup::"
134
126
fi
135
127
working-directory : " ${{ steps.setup.outputs.gem_dir }}"
136
128
env :
0 commit comments