Skip to content

Commit 25a54ad

Browse files
authored
Merge pull request #102 from rspec/update-ubuntu-runner
Update ubuntu runner
2 parents 9b1fee3 + c4a8371 commit 25a54ad

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env:
1313
jobs:
1414
rubocop:
1515
name: Rubocop
16-
runs-on: 'ubuntu-20.04'
16+
runs-on: 'ubuntu-latest'
1717
steps:
1818
- uses: actions/checkout@v4
1919
- uses: ruby/setup-ruby@v1

script/update_rubygems_and_install_bundler

+17-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22

33
set -e
44

5-
echo "Installing latest rubygems / bundler"
6-
yes | gem update --system
7-
yes | gem install bundler
5+
function is_ruby_31_plus {
6+
if ruby -e "exit(RUBY_VERSION.to_f >= 3.1)"; then
7+
return 0
8+
else
9+
return 1
10+
fi
11+
}
12+
13+
if is_ruby_31_plus; then
14+
echo "Installing latest rubygems / bundler"
15+
yes | gem update --system
16+
yes | gem install bundler
17+
else
18+
echo "Installing rubygems 3.2.22 / bundler 2.2.22"
19+
yes | gem update --system '3.2.22'
20+
yes | gem install bundler -v '2.2.22'
21+
fi

0 commit comments

Comments
 (0)