File tree Expand file tree Collapse file tree 6 files changed +55
-22
lines changed Expand file tree Collapse file tree 6 files changed +55
-22
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+ on : [push, pull_request]
3
+ jobs :
4
+ tests :
5
+ runs-on : ubuntu-latest
6
+ strategy :
7
+ fail-fast : false
8
+ matrix :
9
+ ruby : [ '2.7', '3.0', 'head' ]
10
+ rails : [ '6.0', '6.1', 'edge' ]
11
+ include :
12
+ - ruby : ' 2.6'
13
+ rails : ' 5.2'
14
+ - ruby : ' 2.6'
15
+ rails : ' 6.0'
16
+ - ruby : ' 2.6'
17
+ rails : ' 6.1'
18
+
19
+ env :
20
+ RAILS_VERSION : ${{ matrix.rails }}
21
+
22
+ steps :
23
+ - uses : actions/checkout@v2
24
+
25
+ - name : Set up Ruby
26
+ uses : ruby/setup-ruby@v1
27
+ with :
28
+ ruby-version : ${{ matrix.ruby }}
29
+ bundler-cache : true
30
+
31
+ - name : Run unit tests
32
+ run : bundle exec rake test:unit
33
+ timeout-minutes : 3
34
+
35
+ - name : Run unit tests
36
+ run : bundle exec rake test:unit
37
+ timeout-minutes : 3
38
+
39
+ - name : Run acceptance tests
40
+ run : bundle exec rake test:acceptance
41
+ timeout-minutes : 10
42
+ if : ${{ matrix.rails != 'edge' && matrix.ruby != 'head' }} # Acceptance tests use `gem install rails && rails new`
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ source 'https://rubygems.org'
3
3
# Specify your gem's dependencies in spring.gemspec
4
4
gemspec
5
5
6
- if ENV [ "RAILS_VERSION" ]
6
+ if ENV [ "RAILS_VERSION" ] == "edge"
7
+ gem "activesupport" , github : "rails/rails" , branch : "main"
8
+ elsif ENV [ "RAILS_VERSION" ]
7
9
gem "activesupport" , ENV [ "RAILS_VERSION" ]
8
10
end
Original file line number Diff line number Diff line change @@ -12,7 +12,11 @@ class AcceptanceTest < ActiveSupport::TestCase
12
12
DEFAULT_SPEEDUP = 0.8
13
13
14
14
def rails_version
15
- ENV [ 'RAILS_VERSION' ] || '~> 6.0.0'
15
+ if ENV [ 'RAILS_VERSION' ] == "edge"
16
+ "7.0.0.alpha"
17
+ else
18
+ '~> 6.0.0'
19
+ end
16
20
end
17
21
18
22
# Extension point for spring-watchers-listen
Original file line number Diff line number Diff line change @@ -26,7 +26,10 @@ def stderr
26
26
end
27
27
28
28
def log_file
29
- @log_file ||= path ( "tmp/spring.log" ) . open ( "w+" )
29
+ @log_file ||= begin
30
+ path ( "tmp" ) . mkpath
31
+ path ( "tmp/spring.log" ) . open ( "w+" )
32
+ end
30
33
end
31
34
32
35
def env
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ def teardown
33
33
def touch ( file , mtime = nil )
34
34
options = { }
35
35
options [ :mtime ] = mtime if mtime
36
- FileUtils . touch ( file , options )
36
+ FileUtils . touch ( file , ** options )
37
37
end
38
38
39
39
def assert_stale
You can’t perform that action at this time.
0 commit comments