Skip to content

Commit f771d0b

Browse files
authored
Update tests and tested versions to cover Ruby 3.4 and Rails 8 (#832)
* Update rack with newly released version * Add rails8 test fixture * Add controllers to rails8 fixture * Enable rails8 docker container to run * Ensure the correct jobs are present * Ensure bugsnag is installed in the rack app * Ensure filter parameter is present * Add exception to active job breadcrumb in rails 8 * Fix typo, remove 3.4 support * Fix typo in skip method * Downgrade to ruby 3.3 for rails tests * Fix added ruby step * Update tests for recent ruby ecosystem changes * Use correct strings for version declarations * Add base64 gem back into rails * Add logger gem back into rails * Add bigdecimal to 3.4 tests and use working version of sqlite3 in rails 6 * Add timeout to maze-runner runs * Add side-case for Ruby 3.4 hash inspect change * Skip JRuby test problematic on CI - See PLAT-13407 * Ensure rails_env is present in db config * Update timestamp step to be more comprehensive * Move rails8 to sql without bindings * Use Ruby 3.4 as the latest version for running tests * Disable didyoumean for rails8 test runs * Test rails 6 & 7 on Ruby 3.4, update steps for different format of rails error message
1 parent 54acb0d commit f771d0b

File tree

150 files changed

+2830
-89
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+2830
-89
lines changed

.github/workflows/maze-runner.yml

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
fail-fast: false
99
matrix:
10-
ruby-version: ['1.9', '3.3']
10+
ruby-version: ['1.9', '3.4']
1111

1212
uses: ./.github/workflows/run-maze-runner.yml
1313
with:
@@ -40,7 +40,7 @@ jobs:
4040
rack-version: '2'
4141
- ruby-version: '2.4'
4242
rack-version: '3'
43-
- ruby-version: '3.3'
43+
- ruby-version: '3.4'
4444
rack-version: '3'
4545

4646
uses: ./.github/workflows/run-maze-runner.yml
@@ -62,6 +62,12 @@ jobs:
6262
que-version: '1'
6363
- ruby-version: '2.7'
6464
que-version: '1'
65+
- ruby-version: '2.7'
66+
que-version: '2'
67+
- ruby-version: '3.0'
68+
que-version: '2'
69+
- ruby-version: '3.4'
70+
que-version: '2'
6571

6672
uses: ./.github/workflows/run-maze-runner.yml
6773
with:
@@ -76,7 +82,7 @@ jobs:
7682
ruby-version: ['2.5', '2.7']
7783
sidekiq-version: ['2', '3', '4', '5', '6', '7']
7884
include:
79-
- ruby-version: '3.3'
85+
- ruby-version: '3.4'
8086
sidekiq-version: '7'
8187
exclude:
8288
# 2.7 is the minimum ruby version that sidekiq 7 supports
@@ -93,7 +99,7 @@ jobs:
9399
strategy:
94100
fail-fast: false
95101
matrix:
96-
ruby-version: ['2.5']
102+
ruby-version: ['2.5', '3.4']
97103

98104
uses: ./.github/workflows/run-maze-runner.yml
99105
with:
@@ -123,19 +129,35 @@ jobs:
123129
ruby-version: ${{ matrix.ruby-version }}
124130
rails-version: ${{ matrix.rails-version }}
125131

126-
rails-6-7-integrations-maze-runner:
132+
rails-6-7-maze-runner:
127133
strategy:
128134
fail-fast: false
129135
matrix:
130136
ruby-version: ['2.7', '3.3']
131-
rails-version: ['6', '7', '_integrations']
137+
rails-version: ['6', '7']
132138
include:
133139
- ruby-version: '2.5'
134140
rails-version: '6'
135141
exclude:
136142
- ruby-version: '2.7'
137143
rails-version: '6'
138-
- ruby-version: '3.3'
144+
145+
uses: ./.github/workflows/run-maze-runner.yml
146+
with:
147+
features: features/rails_features/ --tags @rails${{ matrix.rails-version }}
148+
ruby-version: ${{ matrix.ruby-version }}
149+
rails-version: ${{ matrix.rails-version }}
150+
151+
rails-8-integrations-maze-runner:
152+
strategy:
153+
fail-fast: false
154+
matrix:
155+
ruby-version: ['2.7', '3.4']
156+
rails-version: ['8', '_integrations']
157+
exclude:
158+
- ruby-version: '2.7'
159+
rails-version: '8'
160+
- ruby-version: '3.4'
139161
rails-version: '_integrations'
140162

141163
uses: ./.github/workflows/run-maze-runner.yml
@@ -148,7 +170,7 @@ jobs:
148170
strategy:
149171
fail-fast: false
150172
matrix:
151-
ruby-version: ['1.9', '2.0', '2.1', '2.2', '2.3', '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3']
173+
ruby-version: ['1.9', '2.0', '2.1', '2.2', '2.3', '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3', '3.4']
152174

153175
uses: ./.github/workflows/run-maze-runner.yml
154176
with:

.github/workflows/run-maze-runner.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ on:
2525
jobs:
2626
maze-runner:
2727
runs-on: ubuntu-latest
28+
timeout-minutes: 30
2829

2930
env:
3031
BUNDLE_GEMFILE: Gemfile-maze-runner

.github/workflows/test-package.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
ruby-version: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3']
12+
ruby-version: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3', '3.4']
1313
optional-groups: ['test sidekiq']
1414
include:
1515
- ruby-version: '1.9'
16+
os: 'ubuntu-20.04'
1617
optional-groups: 'test'
1718
- ruby-version: '2.0'
1819
optional-groups: 'test'

features/fixtures/docker-compose.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,50 @@ services:
300300
- target: 3000
301301
published: 7257
302302

303+
rails8:
304+
build:
305+
context: rails8
306+
args:
307+
- RUBY_TEST_VERSION
308+
depends_on:
309+
- mongo
310+
environment:
311+
- BUGSNAG_API_KEY
312+
- http_proxy
313+
- RAILS_ENV
314+
- BUGSNAG_APP_TYPE
315+
- BUGSNAG_APP_VERSION
316+
- BUGSNAG_AUTO_CAPTURE_SESSIONS
317+
- BUGSNAG_AUTO_NOTIFY
318+
- BUGSNAG_ENDPOINT
319+
- BUGSNAG_IGNORE_CLASS
320+
- BUGSNAG_IGNORE_MESSAGE
321+
- BUGSNAG_META_DATA_FILTERS
322+
- BUGSNAG_NOTIFY_RELEASE_STAGE
323+
- BUGSNAG_PROJECT_ROOT
324+
- BUGSNAG_PROXY_HOST
325+
- BUGSNAG_PROXY_PASSWORD
326+
- BUGSNAG_PROXY_PORT
327+
- BUGSNAG_PROXY_USER
328+
- BUGSNAG_RELEASE_STAGE
329+
- BUGSNAG_SEND_CODE
330+
- BUGSNAG_SEND_ENVIRONMENT
331+
- BUGSNAG_SESSION_ENDPOINT
332+
- BUGSNAG_TIMEOUT
333+
- CALLBACK_INITIATOR
334+
- SQL_ONLY_BREADCRUMBS
335+
- ADD_ON_ERROR
336+
- USE_DEFAULT_AUTO_CAPTURE_SESSIONS
337+
- ADD_REQUEST_ON_ERROR
338+
restart: "no"
339+
networks:
340+
default:
341+
aliases:
342+
- rails8
343+
ports:
344+
- target: 3000
345+
published: 7258
346+
303347
rails_integrations:
304348
build:
305349
context: rails_integrations

features/fixtures/rails6/app/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
44
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
55
gem 'rails', '~> 6'
66
# Use sqlite3 as the database for Active Record
7-
gem 'sqlite3', '~> 1.3', '>= 1.3.6'
7+
gem 'sqlite3', '~> 1.4.4'
88
# Use Puma as the app server
99
gem 'puma', '~> 3.11'
1010
# Use SCSS for stylesheets
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ignore the lock file so that we always use an up to date version. This won't
2+
# exist unless the fixtures are run manually anyway.
3+
app/Gemfile.lock
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
ARG RUBY_TEST_VERSION
2+
FROM ruby:$RUBY_TEST_VERSION
3+
4+
RUN apt-get update
5+
6+
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
7+
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
8+
9+
RUN apt-get install -y nodejs yarn
10+
11+
WORKDIR /bugsnag
12+
COPY temp-bugsnag-lib ./
13+
14+
WORKDIR /usr/src/app
15+
COPY app/Gemfile /usr/src/app/
16+
RUN bundle install
17+
18+
RUN cat Gemfile.lock
19+
20+
COPY app/ /usr/src/app
21+
22+
RUN bundle exec rake db:migrate
23+
24+
RUN mv /usr/src/app/bin-copy /usr/src/app/bin
25+
26+
# RUN bundle exec rake rails:update:bin
27+
28+
ENV RUBYOPT='--disable-did_you_mean'
29+
30+
CMD ["bundle", "exec", "bin/rails", "s", "-b", "0.0.0.0"]
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# See https://docs.docker.com/engine/reference/builder/#dockerignore-file for more about ignoring files.
2+
3+
# Ignore git directory.
4+
/.git/
5+
/.gitignore
6+
7+
# Ignore bundler config.
8+
/.bundle
9+
10+
# Ignore all environment files.
11+
/.env*
12+
13+
# Ignore all default key files.
14+
/config/master.key
15+
/config/credentials/*.key
16+
17+
# Ignore all logfiles and tempfiles.
18+
/log/*
19+
/tmp/*
20+
!/log/.keep
21+
!/tmp/.keep
22+
23+
# Ignore pidfiles, but keep the directory.
24+
/tmp/pids/*
25+
!/tmp/pids/.keep
26+
27+
# Ignore storage (uploaded files in development and any SQLite databases).
28+
/storage/*
29+
!/storage/.keep
30+
/tmp/storage/*
31+
!/tmp/storage/.keep
32+
33+
# Ignore assets.
34+
/node_modules/
35+
/app/assets/builds/*
36+
!/app/assets/builds/.keep
37+
/public/assets
38+
39+
# Ignore CI service files.
40+
/.github
41+
42+
# Ignore development files
43+
/.devcontainer
44+
45+
# Ignore Docker-related files
46+
/.dockerignore
47+
/Dockerfile*
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# See https://git-scm.com/docs/gitattributes for more about git attribute files.
2+
3+
# Mark the database schema as having been generated.
4+
db/schema.rb linguist-generated
5+
6+
# Mark any vendored files as having been vendored.
7+
vendor/* linguist-vendored
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
2+
#
3+
# Temporary files generated by your text editor or operating system
4+
# belong in git's global ignore instead:
5+
# `$XDG_CONFIG_HOME/git/ignore` or `~/.config/git/ignore`
6+
7+
# Ignore bundler config.
8+
/.bundle
9+
10+
# Ignore all environment files.
11+
/.env*
12+
13+
# Ignore all logfiles and tempfiles.
14+
/log/*
15+
/tmp/*
16+
!/log/.keep
17+
!/tmp/.keep
18+
19+
# Ignore pidfiles, but keep the directory.
20+
/tmp/pids/*
21+
!/tmp/pids/
22+
!/tmp/pids/.keep
23+
24+
# Ignore storage (uploaded files in development and any SQLite databases).
25+
/storage/*
26+
!/storage/.keep
27+
/tmp/storage/*
28+
!/tmp/storage/
29+
!/tmp/storage/.keep
30+
31+
/public/assets

0 commit comments

Comments
 (0)