File tree Expand file tree Collapse file tree 4 files changed +40
-5
lines changed Expand file tree Collapse file tree 4 files changed +40
-5
lines changed Original file line number Diff line number Diff line change 13
13
# This tells rspec-rails what branch to run in ci
14
14
RSPEC_VERSION : ' = 3.11.0.pre'
15
15
jobs :
16
+ rubocop :
17
+ name : Rubocop
18
+ runs-on : ' ubuntu-20.04'
19
+ steps :
20
+ - uses : actions/checkout@v2
21
+ - uses : ruby/setup-ruby@v1
22
+ with :
23
+ ruby-version : ' 3.0'
24
+ - run : script/update_rubygems_and_install_bundler
25
+ - run : script/clone_all_rspec_repos
26
+ - run : bundle install --standalone
27
+ - run : bundle binstubs --all
28
+ - run : script/run_rubocop
29
+
16
30
test :
17
31
name : Ruby ${{ matrix.ruby }} ${{ matrix.name_extra || '' }}
18
32
runs-on : ${{ matrix.os || 'ubuntu-20.04' }}
19
33
strategy :
20
34
matrix :
21
35
ruby :
36
+ - ' 3.1'
22
37
- ' 3.0'
23
38
- 2.7
24
39
- 2.6
Original file line number Diff line number Diff line change @@ -92,9 +92,22 @@ function is_ruby_25_plus {
92
92
fi
93
93
}
94
94
95
+ function is_ruby_31_plus {
96
+ if ruby -e " exit(RUBY_VERSION.to_f >= 3.1)" ; then
97
+ return 0
98
+ else
99
+ return 1
100
+ fi
101
+ }
102
+
95
103
function rspec_rails_compatible {
96
104
if is_ruby_25_plus; then
97
- return 0
105
+ # TODO remove when RSpec-Rails build is 3.1 safe by default
106
+ if is_ruby_31_plus; then
107
+ return 1
108
+ else
109
+ return 0
110
+ fi
98
111
else
99
112
return 1
100
113
fi
Original file line number Diff line number Diff line change @@ -21,10 +21,6 @@ if documentation_enforced; then
21
21
fold " doc check" check_documentation_coverage
22
22
fi
23
23
24
- if style_and_lint_enforced; then
25
- fold " rubocop" check_style_and_lint
26
- fi
27
-
28
24
if supports_cross_build_checks; then
29
25
fold " one-by-one specs" run_specs_one_by_one
30
26
export NO_COVERAGE=true
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -e
3
+ source script/functions.sh
4
+
5
+ # Allow repos to override the default functions and add their own
6
+ if [ -f script/custom_build_functions.sh ]; then
7
+ source script/custom_build_functions.sh
8
+ fi
9
+
10
+
11
+ fold " rubocop" check_style_and_lint
You can’t perform that action at this time.
0 commit comments