Skip to content

Commit 62c885e

Browse files
authored
Merge pull request #5246 from rmosolgo/simplify-system-tests
Use Rails master for system tests
2 parents 26de3c6 + 6a1aaac commit 62c885e

File tree

4 files changed

+51
-9
lines changed

4 files changed

+51
-9
lines changed

.github/workflows/ci.yaml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,16 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- uses: actions/checkout@v4
19-
- uses: ruby/setup-ruby@v1
20-
with:
21-
ruby-version: 3.4
22-
bundler-cache: true
23-
- run: bundle exec rake compile
2419
- uses: ruby/setup-ruby@v1
2520
with:
2621
ruby-version: 3.4
2722
bundler-cache: true
2823
env:
29-
BUNDLE_GEMFILE: ./spec/dummy/Gemfile
30-
- run: bundle exec rails test:all
24+
BUNDLE_GEMFILE: gemfiles/rails_master.gemfile
25+
- run: bin/rails test:all
3126
working-directory: ./spec/dummy
27+
env:
28+
BUNDLE_GEMFILE: ../../gemfiles/rails_master.gemfile
3229
# Some coverage goals of these tests:
3330
# - Test once without Rails at all
3431
# - Test postgres, to make sure that the ActiveRecord
@@ -48,8 +45,6 @@ jobs:
4845
ruby: 2.7 # lowest supported version
4946
- gemfile: gemfiles/rails_7.0.gemfile
5047
ruby: 3.1
51-
- gemfile: gemfiles/rails_master.gemfile
52-
ruby: 3.2
5348
- gemfile: gemfiles/rails_7.0.gemfile
5449
ruby: 3.2
5550
- gemfile: gemfiles/rails_7.1.gemfile
@@ -58,17 +53,25 @@ jobs:
5853
ruby: 3.3
5954
graphql_reject_numbers_followed_by_names: 1
6055
coverage: 1
56+
redis: 1
6157
- gemfile: gemfiles/rails_master.gemfile
6258
ruby: 3.4
6359
graphql_reject_numbers_followed_by_names: 1
6460
isolation_level_fiber: 1
61+
redis: 1
6562
runs-on: ubuntu-latest
6663
steps:
6764
- run: echo BUNDLE_GEMFILE=${{ matrix.gemfile }} > $GITHUB_ENV
6865
- run: echo GRAPHQL_REJECT_NUMBERS_FOLLOWED_BY_NAMES=1 > $GITHUB_ENV
6966
if: ${{ !!matrix.graphql_reject_numbers_followed_by_names }}
7067
- run: echo ISOLATION_LEVEL_FIBER=1 > $GITHUB_ENV
7168
if: ${{ !!matrix.isolation_level_fiber }}
69+
- uses: shogo82148/actions-setup-redis@v1
70+
with:
71+
redis-version: "7.x"
72+
if: ${{ !!matrix.redis }}
73+
- run: redis-cli ping
74+
if: ${{ !!matrix.redis }}
7275
- uses: actions/checkout@v4
7376
- uses: ruby/setup-ruby@v1
7477
with:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ gemfiles/*.lock
99
*.db
1010
*.db-shm
1111
*.db-wal
12+
*.sqlite3
1213
.byebug_history
1314
.bundle/
1415
vendor/

gemfiles/rails_master.gemfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,11 @@ if RUBY_ENGINE == "ruby" # This doesn't work on truffle-ruby because there's no
1616
end
1717
gem "async"
1818
gem "google-protobuf"
19+
gem "redis"
20+
21+
gem 'puma'
22+
gem 'sprockets-rails'
23+
gem 'capybara'
24+
gem 'selenium-webdriver'
1925

2026
gemspec path: "../"

spec/dummy/config/database.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# SQLite. Versions 3.8.0 and up are supported.
2+
# gem install sqlite3
3+
#
4+
# Ensure the SQLite 3 gem is defined in your Gemfile
5+
# gem "sqlite3"
6+
#
7+
default: &default
8+
adapter: sqlite3
9+
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
10+
timeout: 5000
11+
12+
development:
13+
<<: *default
14+
database: storage/development.sqlite3
15+
16+
# Warning: The database defined as "test" will be erased and
17+
# re-generated from your development database when you run "rake".
18+
# Do not set this db to the same as development or production.
19+
test:
20+
<<: *default
21+
database: storage/test.sqlite3
22+
23+
24+
# SQLite3 write its data on the local filesystem, as such it requires
25+
# persistent disks. If you are deploying to a managed service, you should
26+
# make sure it provides disk persistence, as many don't.
27+
#
28+
# Similarly, if you deploy your application as a Docker container, you must
29+
# ensure the database is located in a persisted volume.
30+
production:
31+
<<: *default
32+
# database: path/to/persistent/storage/production.sqlite3

0 commit comments

Comments
 (0)