Skip to content

Commit 49dbc50

Browse files
committed
Don't run Rails 7.2 on Ruby 3.0
1 parent c321e4c commit 49dbc50

File tree

3 files changed

+20
-25
lines changed

3 files changed

+20
-25
lines changed

.github/workflows/main.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ jobs:
99
strategy:
1010
matrix:
1111
ruby-version: ['3.0', '3.3']
12+
gemfile: ['Gemfile', 'Gemfile_rails71']
13+
exclude:
14+
# Rails 7.2 requires Ruby 3.1+
15+
- ruby-version: '3.0'
16+
gemfile: 'Gemfile'
1217

1318
steps:
1419
- uses: actions/checkout@v4
@@ -18,4 +23,4 @@ jobs:
1823
bundler-cache: true
1924

2025
- name: Run tests
21-
run: ./script/test
26+
run: ./script/test ${{matrix.gemfile}}

script/test

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ cd ..
1313

1414
echo "---> Running tests"
1515
bundle exec rake
16-
./script/test_example_app
16+
BUNDLE_GEMFILE="${1-Gemfile}" ./script/test_example_app
1717

1818
bundle exec rake test
1919

script/test_example_app

+13-23
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,17 @@
22

33
set -e
44

5-
run_example_tests() {
6-
bundle
7-
yarn install
8-
9-
# test a normal test run
10-
bundle exec rake db:test:prepare
11-
NODE_OPTIONS=--openssl-legacy-provider RAILS_ENV=test bundle exec rake assets:precompile
12-
bundle exec rake cypress:run
13-
14-
# test that passing options works (by printing help)
15-
if ! bundle exec rake cypress:run CYPRESS_RAILS_CYPRESS_OPTS="-h" | grep -q "Usage: cypress run \[options\]"; then
16-
echo "Failed to pass options to cypress run"
17-
exit 1
18-
fi
19-
}
20-
21-
225
cd example
23-
24-
echo "---> Running example tests with default Gemfile"
25-
run_example_tests
26-
27-
echo "---> Running example tests with Gemfile.rails71"
28-
BUNDLE_GEMFILE=Gemfile.rails71 run_example_tests
6+
bundle
7+
yarn install
8+
9+
# test a normal test run
10+
bundle exec rake db:test:prepare
11+
NODE_OPTIONS=--openssl-legacy-provider RAILS_ENV=test bundle exec rake assets:precompile
12+
bundle exec rake cypress:run
13+
14+
# test that passing options works (by printing help)
15+
if ! bundle exec rake cypress:run CYPRESS_RAILS_CYPRESS_OPTS="-h" | grep -q "Usage: cypress run \[options\]"; then
16+
echo "Failed to pass options to cypress run"
17+
exit 1
18+
fi

0 commit comments

Comments
 (0)