Skip to content

Commit 0599d0b

Browse files
committed
chore: update ruby versions list
1 parent d650ae2 commit 0599d0b

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

Diff for: .github/workflows/main.yml

+23-1
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,37 @@ jobs:
2020
continue-on-error: true
2121
steps:
2222
- uses: actions/checkout@v2
23+
2324
- name: Set up Ruby
2425
uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
2526
with:
2627
ruby-version: ${{ matrix.ruby-version }}
28+
29+
- name: Install compatible Bundler version
30+
run: |
31+
ruby_version=$(ruby -e 'print RUBY_VERSION')
32+
major=$(echo $ruby_version | cut -d. -f1)
33+
minor=$(echo $ruby_version | cut -d. -f2)
34+
35+
if [[ $major -ge 3 ]]; then
36+
bundler_version="2.5.23"
37+
elif [[ $major -eq 2 && $minor -ge 6 ]]; then
38+
bundler_version="2.4.22"
39+
else
40+
echo "Unsupported Ruby version: $ruby_version"
41+
exit 1
42+
fi
43+
44+
echo "Installing Bundler $bundler_version for Ruby $ruby_version"
45+
gem install bundler -v $bundler_version --no-document
46+
2747
- name: Install dependencies
2848
run: bundle install
49+
2950
- name: Run tests
3051
run: ruby tests/e2e/run_all_tests.rb
31-
- name: Notification
52+
53+
- name: Notification
3254
if: always()
3355
id: slack
3456
uses: wingify/[email protected]

0 commit comments

Comments
 (0)