Skip to content

Commit b024eb4

Browse files
authored
Merge pull request #808 from portagenetwork/aaron/bump-ruby-to-3.1.4
Bump Ruby to v3.1.4
2 parents d7a4ff2 + 1cb91ab commit b024eb4

10 files changed

+40
-102
lines changed

.github/workflows/danger.yml

+4-15
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,11 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v3
1111

12-
- name: 'Determine Ruby and Bundler Versions from Gemfile.lock'
13-
run: |
14-
echo "RUBY_VERSION=`cat ./Gemfile.lock | grep -A 1 'RUBY VERSION' | grep 'ruby' | grep -oE '[0-9]\.[0-9]'`" >> $GITHUB_ENV
15-
echo "BUNDLER_VERSION=`cat ./Gemfile.lock | grep -A 1 'BUNDLED WITH' | grep -oE '[0-9]\.[0-9]'`" >> $GITHUB_ENV
16-
17-
# Install Ruby - using the version found in the Gemfile.lock
18-
- name: 'Install Ruby'
19-
uses: ruby/setup-ruby@v1
12+
# Install Ruby and run bundler
13+
- uses: ruby/setup-ruby@v1
2014
with:
21-
ruby-version: ${{ env.RUBY_VERSION }}
22-
23-
- name: 'Bundle Install'
24-
run: |
25-
gem install bundler -v ${{ env.BUNDLER_VERSION }}
26-
bundle config path vendor/bundle
27-
bundle install --jobs 4 --retry 3 --without pgsql rollbar aws
15+
ruby-version: '3.1.4'
16+
bundler-cache: true
2817

2918
- name: 'Run Danger'
3019
env:

.github/workflows/mysql.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
# Install Ruby and run bundler
2020
- uses: ruby/setup-ruby@v1
2121
with:
22-
ruby-version: '3.0'
22+
ruby-version: '3.1.4'
2323
bundler-cache: true
2424

2525
# Install Node

.github/workflows/postgres.yml

+11-42
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
--health-timeout 5s
2424
--health-retries 5
2525
26+
# Define environment variables for Postgres and Rails
2627
env:
2728
RAILS_ENV: test
2829
DATABASE_URL: postgres://postgres:@localhost:5432/roadmap_test
@@ -34,7 +35,7 @@ jobs:
3435
# Install Ruby and run bundler
3536
- uses: ruby/setup-ruby@v1
3637
with:
37-
ruby-version: '3.0'
38+
ruby-version: '3.1.4'
3839
bundler-cache: true
3940

4041
## - run: echo 'NODE_OPTIONS="--openssl-legacy-provider"' >> $GITHUB_ENV
@@ -46,84 +47,52 @@ jobs:
4647
node-version: '16.6.0'
4748
cache: 'yarn'
4849

50+
# Install the Postgres developer packages
4951
- name: 'Install Postgresql Packages'
5052
run: |
5153
sudo apt-get update
5254
sudo apt-get install libpq-dev
5355
54-
- name: 'Determine Ruby and Bundler Versions from Gemfile.lock'
55-
run: |
56-
echo "RUBY_VERSION=`cat ./Gemfile.lock | grep -A 1 'RUBY VERSION' | grep 'ruby' | grep -oE '[0-9]\.[0-9]'`" >> $GITHUB_ENV
57-
echo "BUNDLER_VERSION=`cat ./Gemfile.lock | grep -A 1 'BUNDLED WITH' | grep -oE '[0-9]\.[0-9]'`" >> $GITHUB_ENV
58-
59-
# Install Ruby - using the version found in the Gemfile.lock
60-
- name: 'Install Ruby'
61-
uses: ruby/setup-ruby@v1
62-
with:
63-
ruby-version: ${{ env.RUBY_VERSION }}
64-
6556
# Copy all of the example configs over
6657
- name: 'Setup Default Configuration'
6758
run: |
68-
# Make copies of all the example config files
6959
cp config/database.yml.sample config/database.yml
7060
cp config/initializers/contact_us.rb.example config/initializers/contact_us.rb
7161
cp config/initializers/wicked_pdf.rb.example config/initializers/wicked_pdf.rb
7262
cp .env.postgresql .env
7363
74-
# Try to retrieve the gems from the cache
75-
- name: 'Cache Gems'
76-
uses: actions/cache@v2.1.5
77-
with:
78-
path: vendor/bundle
79-
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
80-
restore-keys: |
81-
${{ runner.os }}-gem-
82-
83-
- name: 'Bundle Install'
84-
run: |
85-
gem install bundler -v ${{ env.BUNDLER_VERSION }}
86-
bundle config path vendor/bundle
87-
bundle install --jobs 4 --retry 3 --without mysql rollbar aws
88-
64+
# Stub out the Rails credentials file so that we can start the Rails app
8965
- name: 'Setup Credentials'
9066
run: |
9167
# generate a default credential file and key
9268
EDITOR='echo "$(cat config/credentials.yml.postgresql)" >' bundle exec rails credentials:edit
9369
94-
# Try to retrieve the yarn JS dependencies from the cache
95-
- name: 'Cache Yarn Packages'
96-
uses: actions/cache@v2.1.5
97-
with:
98-
path: node_modules/
99-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
100-
restore-keys: |
101-
${{ runner.os }}-build-${{ env.cache-name }}-
102-
${{ runner.os }}-build-
103-
${{ runner.os }}-yarn-
104-
${{ runner.os }}-
105-
70+
# Set the path to the wkhtmltopdf executable
10671
- name: 'Determine wkhtmltopdf location'
10772
run: echo "WICKED_PDF_PATH=`bundle exec which wkhtmltopdf`" >> $GITHUB_ENV
10873

74+
# Run yarn install for JS dependencies
10975
- name: 'Yarn Install'
11076
run: |
11177
yarn install
11278
79+
# Initialize the DB
11380
- name: 'Setup Test DB'
11481
run: |
11582
bundle exec rails db:setup RAILS_ENV=test
11683
bundle exec rails db:migrate RAILS_ENV=test
11784
85+
# Prebuild the CSS, JS and image assets
11886
- name: 'Compile Assets'
11987
run: bundle exec rails assets:precompile
12088

89+
# Run the unit and functional tests
12190
- name: 'Run Rspec Unit and Functional Tests'
12291
run: |
12392
bundle exec rspec spec/models/ spec/policies/ spec/services/ spec/helpers/
12493
bundle exec rspec spec/controllers/ spec/presenters/ spec/requests/ spec/views
12594
bundle exec rspec spec/mixins/
12695
127-
# Integration Tests are only run if PR or Push is to master or development branches
96+
# Run the time consuming integration tests (using Chrome headless browser)
12897
- name: 'Run Integration Tests'
129-
run: bundle exec rspec spec/features/
98+
run: bundle exec rspec spec/features/

.github/workflows/rubocop.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: 'Install Ruby'
1919
uses: ruby/setup-ruby@v1
2020
with:
21-
ruby-version: '3.0'
21+
ruby-version: '3.1.4'
2222
bundler-cache: true
2323

2424
- name: 'Run Rubocop'

.github/workflows/ruby.yml

+10-39
Original file line numberDiff line numberDiff line change
@@ -41,27 +41,25 @@ jobs:
4141
steps:
4242
# Checkout the repo
4343
- uses: actions/checkout@v3
44+
45+
# Install Ruby and run bundler
46+
- uses: ruby/setup-ruby@v1
4447
with:
45-
fetch-depth: 1
48+
ruby-version: '3.1.4'
49+
bundler-cache: true
50+
51+
# Install Node
4652
- uses: actions/setup-node@v3
4753
with:
48-
node-version: 16
54+
node-version: '16.6.0'
55+
cache: 'yarn'
4956

57+
# Install the Postgres developer packages
5058
- name: 'Install Postgresql Packages'
5159
run: |
5260
sudo apt-get update
5361
sudo apt-get install libpq-dev
5462
55-
- name: 'Determine Ruby and Bundler Versions from Gemfile.lock'
56-
run: |
57-
echo "RUBY_VERSION=`cat ./Gemfile.lock | grep -A 1 'RUBY VERSION' | grep 'ruby' | grep -oE '[0-9]\.[0-9]'`" >> $GITHUB_ENV
58-
echo "BUNDLER_VERSION=`cat ./Gemfile.lock | grep -A 1 'BUNDLED WITH' | grep -oE '[0-9]\.[0-9]'`" >> $GITHUB_ENV
59-
60-
- name: 'Install Ruby'
61-
uses: ruby/setup-ruby@v1
62-
with:
63-
ruby-version: ${{ env.RUBY_VERSION }}
64-
6563
# Copy all of the example configs over
6664
- name: 'Setup Default Configuration'
6765
run: |
@@ -70,38 +68,11 @@ jobs:
7068
cp config/initializers/contact_us.rb.example config/initializers/contact_us.rb
7169
cp config/initializers/wicked_pdf.rb.example config/initializers/wicked_pdf.rb
7270
73-
# Try to retrieve the gems from the cache
74-
- name: 'Cache Gems'
75-
uses: actions/cache@v2.1.5
76-
with:
77-
path: vendor/bundle
78-
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
79-
restore-keys: |
80-
${{ runner.os }}-gem-
81-
82-
- name: 'Bundle Install'
83-
run: |
84-
gem install bundler -v ${{ env.BUNDLER_VERSION }}
85-
bundle config path vendor/bundle
86-
bundle install --jobs 4 --retry 3 --without mysql rollbar aws
87-
8871
- name: 'Setup Credentials'
8972
run: |
9073
# generate a default credential file and key
9174
EDITOR='echo "$(cat config/credentials.yml.mysql2)" >' bundle exec rails credentials:edit
9275
93-
# Try to retrieve the yarn JS dependencies from the cache
94-
- name: 'Cache Yarn Packages'
95-
uses: actions/cache@v2.1.5
96-
with:
97-
path: node_modules/
98-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
99-
restore-keys: |
100-
${{ runner.os }}-build-${{ env.cache-name }}-
101-
${{ runner.os }}-build-
102-
${{ runner.os }}-yarn-
103-
${{ runner.os }}-
104-
10576
- name: 'Determine wkhtmltopdf location'
10677
run: echo "WICKED_PDF_PATH=`bundle exec which wkhtmltopdf`" >> $GITHUB_ENV
10778

.rubocop.yml

+6
Original file line numberDiff line numberDiff line change
@@ -198,3 +198,9 @@ Style/StringLiterals:
198198
- 'config/**/*'
199199
Style/SwapValues: # new in 1.1
200200
Enabled: true
201+
202+
Style/HashSyntax:
203+
Enabled: false
204+
205+
Style/ArrayIntersect:
206+
Enabled: false

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@
7272

7373
- Bump braces from 3.0.2 to 3.0.3 [#795](https://github.com/portagenetwork/roadmap/pull/795)
7474

75+
- Bump Ruby from 3.0.4 to 3.1.4 [#808](https://github.com/portagenetwork/roadmap/pull/808)
76+
7577
## V4.1.1
7678

7779
### Added

Dockerfile.production

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ruby:3.0.5
1+
FROM ruby:3.1.4
22

33
# Setup bundle to install gems to volume
44
ENV BUNDLE_PATH=/bundle/ \

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
source 'https://rubygems.org'
44

5-
ruby '>= 3.0'
5+
ruby '3.1.4'
66

77
# ===========#
88
# CORE RAILS #

Gemfile.lock

+3-2
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ GEM
195195
faraday (>= 0.8)
196196
faraday-net_http (3.1.0)
197197
net-http
198-
ffi (1.17.0)
198+
ffi (1.17.0-arm64-darwin)
199+
ffi (1.17.0-x86_64-linux-gnu)
199200
flag_shih_tzu (0.3.23)
200201
fog-aws (3.21.0)
201202
fog-core (~> 2.1)
@@ -648,7 +649,7 @@ DEPENDENCIES
648649
yard-tomdoc
649650

650651
RUBY VERSION
651-
ruby 3.0.4p208
652+
ruby 3.1.4p223
652653

653654
BUNDLED WITH
654655
2.4.15

0 commit comments

Comments
 (0)