Skip to content

Commit aeec0ee

Browse files
authored
Expand CI matrix to run tests against a rails 7 application (#73)
* Add appraisal development dependency This will be used to generate multiple gemfiles so that we can test importmap-rails against different sets of dependencies on CI. * Use appraisals to generate a second gemfile that uses rails 7 (generated via `bundle exec appraisal install`) We'll use this new Gemfile to test importmap-rails against rails 7 on CI * Expand CI matrix to run tests against rails 7 Previously, importmap-rails was only tested against a rails 6 application on CI. Since rails 7 is around the corner and will feature importmap-rails as the default JavaScript setup [1], we should also continuously run our test suite against a rails 7 application to be confident that importmap-rails works properly with rails 7. [1]: rails/rails@af7428c
1 parent 27236e3 commit aeec0ee

File tree

6 files changed

+239
-3
lines changed

6 files changed

+239
-3
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,18 @@ jobs:
77
ruby-version:
88
- "2.7"
99
- "3.0"
10+
gemfile:
11+
- Gemfile
12+
- gemfiles/rails_7.gemfile
1013
continue-on-error: [ false ]
1114

12-
name: ${{ format('Tests (Ruby {0})', matrix.ruby-version) }}
15+
name: ${{ format('Tests (Ruby {0}, {1})', matrix.ruby-version, matrix.gemfile) }}
1316
runs-on: ubuntu-latest
1417
continue-on-error: ${{ matrix.continue-on-error }}
1518

19+
env:
20+
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
21+
1622
steps:
1723
- uses: actions/checkout@v1
1824

Appraisals

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
appraise "rails_7" do
2+
gem "rails", github: "rails/rails", ref: "main"
3+
gem "sprockets-rails"
4+
end

Gemfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
44
# Specify your gem's dependencies in importmap-rails.gemspec.
55
gemspec
66

7-
rails_version = ENV["RAILS_VERSION"] || "6.1.0"
8-
gem "rails", "~> #{rails_version}"
7+
gem "rails", "~> 6.1.0"
98

109
gem "sqlite3"
1110

11+
group :development do
12+
gem "appraisal"
13+
end
14+
1215
group :test do
1316
gem "turbo-rails"
1417
gem "stimulus-rails"

Gemfile.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ GEM
6868
zeitwerk (~> 2.3)
6969
addressable (2.8.0)
7070
public_suffix (>= 2.0.2, < 5.0)
71+
appraisal (2.4.1)
72+
bundler
73+
rake
74+
thor (>= 0.14.0)
7175
builder (3.2.4)
7276
byebug (11.1.3)
7377
capybara (3.35.3)
@@ -173,6 +177,7 @@ PLATFORMS
173177
x86_64-linux
174178

175179
DEPENDENCIES
180+
appraisal
176181
byebug
177182
capybara
178183
importmap-rails!

gemfiles/rails_7.gemfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "rails", ref: "main", git: "https://github.com/rails/rails.git"
6+
gem "sqlite3"
7+
gem "sprockets-rails"
8+
9+
group :development do
10+
gem "appraisal"
11+
end
12+
13+
group :test do
14+
gem "turbo-rails"
15+
gem "stimulus-rails"
16+
gem "byebug"
17+
gem "rexml"
18+
gem "capybara"
19+
gem "selenium-webdriver"
20+
gem "webdrivers"
21+
end
22+
23+
gemspec path: "../"

gemfiles/rails_7.gemfile.lock

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
GIT
2+
remote: https://github.com/rails/rails.git
3+
revision: f132be462b957ea4cd8b72bf9e7be77a184a887b
4+
ref: main
5+
specs:
6+
actioncable (7.0.0.alpha2)
7+
actionpack (= 7.0.0.alpha2)
8+
activesupport (= 7.0.0.alpha2)
9+
nio4r (~> 2.0)
10+
websocket-driver (>= 0.6.1)
11+
actionmailbox (7.0.0.alpha2)
12+
actionpack (= 7.0.0.alpha2)
13+
activejob (= 7.0.0.alpha2)
14+
activerecord (= 7.0.0.alpha2)
15+
activestorage (= 7.0.0.alpha2)
16+
activesupport (= 7.0.0.alpha2)
17+
mail (>= 2.7.1)
18+
actionmailer (7.0.0.alpha2)
19+
actionpack (= 7.0.0.alpha2)
20+
actionview (= 7.0.0.alpha2)
21+
activejob (= 7.0.0.alpha2)
22+
activesupport (= 7.0.0.alpha2)
23+
mail (~> 2.5, >= 2.5.4)
24+
rails-dom-testing (~> 2.0)
25+
actionpack (7.0.0.alpha2)
26+
actionview (= 7.0.0.alpha2)
27+
activesupport (= 7.0.0.alpha2)
28+
rack (~> 2.0, >= 2.2.0)
29+
rack-test (>= 0.6.3)
30+
rails-dom-testing (~> 2.0)
31+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
32+
actiontext (7.0.0.alpha2)
33+
actionpack (= 7.0.0.alpha2)
34+
activerecord (= 7.0.0.alpha2)
35+
activestorage (= 7.0.0.alpha2)
36+
activesupport (= 7.0.0.alpha2)
37+
nokogiri (>= 1.8.5)
38+
actionview (7.0.0.alpha2)
39+
activesupport (= 7.0.0.alpha2)
40+
builder (~> 3.1)
41+
erubi (~> 1.4)
42+
rails-dom-testing (~> 2.0)
43+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
44+
activejob (7.0.0.alpha2)
45+
activesupport (= 7.0.0.alpha2)
46+
globalid (>= 0.3.6)
47+
activemodel (7.0.0.alpha2)
48+
activesupport (= 7.0.0.alpha2)
49+
activerecord (7.0.0.alpha2)
50+
activemodel (= 7.0.0.alpha2)
51+
activesupport (= 7.0.0.alpha2)
52+
activestorage (7.0.0.alpha2)
53+
actionpack (= 7.0.0.alpha2)
54+
activejob (= 7.0.0.alpha2)
55+
activerecord (= 7.0.0.alpha2)
56+
activesupport (= 7.0.0.alpha2)
57+
marcel (~> 1.0)
58+
mini_mime (>= 1.1.0)
59+
activesupport (7.0.0.alpha2)
60+
concurrent-ruby (~> 1.0, >= 1.0.2)
61+
i18n (>= 1.6, < 2)
62+
minitest (>= 5.1)
63+
tzinfo (~> 2.0)
64+
rails (7.0.0.alpha2)
65+
actioncable (= 7.0.0.alpha2)
66+
actionmailbox (= 7.0.0.alpha2)
67+
actionmailer (= 7.0.0.alpha2)
68+
actionpack (= 7.0.0.alpha2)
69+
actiontext (= 7.0.0.alpha2)
70+
actionview (= 7.0.0.alpha2)
71+
activejob (= 7.0.0.alpha2)
72+
activemodel (= 7.0.0.alpha2)
73+
activerecord (= 7.0.0.alpha2)
74+
activestorage (= 7.0.0.alpha2)
75+
activesupport (= 7.0.0.alpha2)
76+
bundler (>= 1.15.0)
77+
railties (= 7.0.0.alpha2)
78+
railties (7.0.0.alpha2)
79+
actionpack (= 7.0.0.alpha2)
80+
activesupport (= 7.0.0.alpha2)
81+
method_source
82+
rake (>= 12.2)
83+
thor (~> 1.0)
84+
zeitwerk (~> 2.5)
85+
86+
PATH
87+
remote: ..
88+
specs:
89+
importmap-rails (0.8.2)
90+
rails (>= 6.0.0)
91+
92+
GEM
93+
remote: https://rubygems.org/
94+
specs:
95+
addressable (2.8.0)
96+
public_suffix (>= 2.0.2, < 5.0)
97+
appraisal (2.4.1)
98+
bundler
99+
rake
100+
thor (>= 0.14.0)
101+
builder (3.2.4)
102+
byebug (11.1.3)
103+
capybara (3.36.0)
104+
addressable
105+
matrix
106+
mini_mime (>= 0.1.3)
107+
nokogiri (~> 1.8)
108+
rack (>= 1.6.0)
109+
rack-test (>= 0.6.3)
110+
regexp_parser (>= 1.5, < 3.0)
111+
xpath (~> 3.2)
112+
childprocess (4.1.0)
113+
concurrent-ruby (1.1.9)
114+
crass (1.0.6)
115+
erubi (1.10.0)
116+
globalid (0.5.2)
117+
activesupport (>= 5.0)
118+
i18n (1.8.11)
119+
concurrent-ruby (~> 1.0)
120+
loofah (2.12.0)
121+
crass (~> 1.0.2)
122+
nokogiri (>= 1.5.9)
123+
mail (2.7.1)
124+
mini_mime (>= 0.1.1)
125+
marcel (1.0.2)
126+
matrix (0.4.2)
127+
method_source (1.0.0)
128+
mini_mime (1.1.2)
129+
minitest (5.14.4)
130+
nio4r (2.5.8)
131+
nokogiri (1.12.5-x86_64-linux)
132+
racc (~> 1.4)
133+
public_suffix (4.0.6)
134+
racc (1.6.0)
135+
rack (2.2.3)
136+
rack-test (1.1.0)
137+
rack (>= 1.0, < 3)
138+
rails-dom-testing (2.0.3)
139+
activesupport (>= 4.2.0)
140+
nokogiri (>= 1.6)
141+
rails-html-sanitizer (1.4.2)
142+
loofah (~> 2.3)
143+
rake (13.0.6)
144+
regexp_parser (2.1.1)
145+
rexml (3.2.5)
146+
rubyzip (2.3.2)
147+
selenium-webdriver (4.0.3)
148+
childprocess (>= 0.5, < 5.0)
149+
rexml (~> 3.2, >= 3.2.5)
150+
rubyzip (>= 1.2.2)
151+
sprockets (4.0.2)
152+
concurrent-ruby (~> 1.0)
153+
rack (> 1, < 3)
154+
sprockets-rails (3.4.0)
155+
actionpack (>= 5.2)
156+
activesupport (>= 5.2)
157+
sprockets (>= 3.0.0)
158+
sqlite3 (1.4.2)
159+
stimulus-rails (0.7.2)
160+
rails (>= 6.0.0)
161+
thor (1.1.0)
162+
turbo-rails (0.8.3)
163+
rails (>= 6.0.0)
164+
tzinfo (2.0.4)
165+
concurrent-ruby (~> 1.0)
166+
webdrivers (5.0.0)
167+
nokogiri (~> 1.6)
168+
rubyzip (>= 1.3.0)
169+
selenium-webdriver (~> 4.0)
170+
websocket-driver (0.7.5)
171+
websocket-extensions (>= 0.1.0)
172+
websocket-extensions (0.1.5)
173+
xpath (3.2.0)
174+
nokogiri (~> 1.8)
175+
zeitwerk (2.5.1)
176+
177+
PLATFORMS
178+
x86_64-linux
179+
180+
DEPENDENCIES
181+
appraisal
182+
byebug
183+
capybara
184+
importmap-rails!
185+
rails!
186+
rexml
187+
selenium-webdriver
188+
sprockets-rails
189+
sqlite3
190+
stimulus-rails
191+
turbo-rails
192+
webdrivers
193+
194+
BUNDLED WITH
195+
2.2.30

0 commit comments

Comments
 (0)