3232 id : setup
3333 shell : bash
3434 run : |
35+ # 🛠️ Setup 🛠️
3536 dir=$(find . -iname '${{ inputs.gem }}.gemspec' -exec dirname {} \;)
3637 echo "gem_dir=${dir}" >> $GITHUB_OUTPUT
3738
@@ -57,76 +58,68 @@ runs:
5758 # ...but not for appraisals, sadly.
5859 - name : Install Ruby ${{ inputs.ruby }} with dependencies
5960 if : " ${{ steps.setup.outputs.appraisals == 'false' }}"
60- uses : ruby/setup-ruby@v1
61+ uses : ruby/setup-ruby@v1.144.1
6162 with :
6263 ruby-version : " ${{ inputs.ruby }}"
6364 working-directory : " ${{ steps.setup.outputs.gem_dir }}"
65+ bundler : " latest"
6466 bundler-cache : true
6567 cache-version : " v1-${{ steps.setup.outputs.cache_key }}"
6668
6769 # If we're using appraisals, do it all manually.
6870 - name : Install Ruby ${{ inputs.ruby }} without dependencies
6971 if : " ${{ steps.setup.outputs.appraisals == 'true' }}"
70- uses : ruby/setup-ruby@v1
72+ uses : ruby/setup-ruby@v1.144.1
7173 with :
7274 ruby-version : " ${{ inputs.ruby }}"
73- - name : Install dependencies and appraisals
75+ bundler : " latest"
76+ working-directory : " ${{ steps.setup.outputs.gem_dir }}"
77+ - name : Install dependencies and generate appraisals
7478 if : " ${{ steps.setup.outputs.appraisals == 'true' }}"
7579 shell : bash
7680 run : |
77- cd "${{ steps.setup.outputs.gem_dir }}"
78- bundle install
79- bundle exec appraisal install
81+ # 💎 Install dependencies and generate appraisals 💎
82+ bundle install --quiet --jobs=3 --retry=4
83+ bundle exec appraisal generate
84+ working-directory : " ${{ steps.setup.outputs.gem_dir }}"
8085
8186 - name : Test Gem
8287 shell : bash
8388 run : |
84- cd "${{ steps.setup.outputs.gem_dir }}"
85-
89+ # 🍿 Test Gem 🍿
8690 if [[ -f "Appraisals" ]]; then
87- bundle exec appraisal rake test
91+ for i in `bundle exec appraisal list | sed 's/-/_/g' `; do
92+ echo "::group::🔎 Appraising ${i}"
93+ BUNDLE_GEMFILE=gemfiles/${i}.gemfile bundle install --quiet --jobs=3 --retry=4 && \
94+ BUNDLE_GEMFILE=gemfiles/${i}.gemfile bundle show && \
95+ BUNDLE_GEMFILE=gemfiles/${i}.gemfile bundle exec rake test
96+ echo "::endgroup::"
97+ done
8898 else
8999 bundle exec rake test
90100 fi
91- env :
92- TEST_KAFKA_HOST : " 127.0.0.1"
93- TEST_KAFKA_PORT : 29092
94- TEST_MYSQL_HOST : " 127.0.0.1"
95- TEST_MYSQL_PORT : 3306
96- TEST_MYSQL_USER : mysql
97- TEST_MYSQL_PASSWORD : mysql
98- TEST_POSTGRES_PASSWORD : postgres
99- TEST_POSTGRES_USER : postgres
100- TEST_POSTGRES_HOST : localhost
101- TEST_POSTGRES_PORT : 5432
102- TEST_POSTGRES_DB : postgres
103- TEST_MEMCACHED_HOST : localhost
104- TEST_MEMCACHED_PORT : 11211
105- TEST_MONGODB_HOST : localhost
106- TEST_MONGODB_PORT : 27017
107- TEST_RABBITMQ_HOST : localhost
108- TEST_RABBITMQ_PORT : 5672
109- TEST_RABBITMQ_URL : amqp://guest:guest@localhost:5672
110- TEST_REDIS_HOST : localhost
111- TEST_REDIS_PORT : 6379
101+ working-directory : " ${{ steps.setup.outputs.gem_dir }}"
112102
113103 - name : YARD
114104 shell : bash
115105 if : " ${{ inputs.yard == 'true' }}"
116106 run : |
117- cd "${{ steps.setup.outputs.gem_dir }}"
107+ # 📄 Yard Docs 📄
118108 bundle exec rake yard
109+ working-directory : " ${{ steps.setup.outputs.gem_dir }}"
119110
120111 - name : Rubocop
121112 shell : bash
122113 if : " ${{ inputs.rubocop == 'true' }}"
123114 run : |
124- cd "${{ steps.setup.outputs.gem_dir }}"
115+ # 🤖 Rubocop 🤖
125116 bundle exec rake rubocop
117+ working-directory : " ${{ steps.setup.outputs.gem_dir }}"
126118
127119 - name : Build Gem
128120 shell : bash
129121 if : " ${{ inputs.build == 'true' }}"
130122 run : |
131- cd "${{ steps.setup.outputs.gem_dir }}"
123+ # 📦 Build Gem 📦
132124 gem build ${{ inputs.gem }}.gemspec
125+ working-directory : " ${{ steps.setup.outputs.gem_dir }}"
0 commit comments