Skip to content

Commit 2ae640f

Browse files
authored
Upgrade to Ubuntu 22.04 on Github Actions (#2451)
* Upgrade to Ubuntu 22.04 on Github Actions Also add test matrix for Ruby 3.2 and Rails 7.0 * Upgrade rubocop to v1 for ruby 3+ in order to pass tests
1 parent 9fa9373 commit 2ae640f

File tree

5 files changed

+460
-4
lines changed

5 files changed

+460
-4
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ on: [push, pull_request]
77
jobs:
88
test:
99
name: "Testing"
10-
runs-on: ubuntu-18.04
10+
runs-on: ubuntu-22.04
1111
strategy:
1212
fail-fast: false
1313
matrix:
1414
include:
1515
# Recent Rubies and Rails
16+
- ruby-version: '3.2'
17+
rails-version: '7.0'
1618
- ruby-version: '3.1'
1719
rails-version: '7.0'
1820
- ruby-version: '3.0'

.rubocop_v0.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
AllCops:
2+
TargetRubyVersion: 2.1
3+
Exclude:
4+
- !ruby/regexp /(vendor|bundle|bin|db|tmp)\/.*/
5+
DisplayCopNames: true
6+
DisplayStyleGuide: true
7+
# https://github.com/bbatsov/rubocop/blob/master/manual/caching.md
8+
# https://github.com/bbatsov/rubocop/blob/e8680418b351491e111a18cf5b453fc07a3c5239/config/default.yml#L60-L77
9+
UseCache: true
10+
CacheRootDirectory: tmp
11+
12+
Rails:
13+
Enabled: true
14+
15+
Lint/NestedMethodDefinition:
16+
Enabled: false
17+
Exclude:
18+
- test/action_controller/serialization_test.rb
19+
20+
Style/Alias:
21+
EnforcedStyle: prefer_alias
22+
23+
Style/StringLiterals:
24+
EnforcedStyle: single_quotes
25+
26+
Metrics/AbcSize:
27+
Max: 35 # TODO: Lower to 15
28+
29+
Metrics/ClassLength:
30+
Max: 261 # TODO: Lower to 100
31+
Exclude:
32+
- test/**/*.rb
33+
34+
Metrics/CyclomaticComplexity:
35+
Max: 7 # TODO: Lower to 6
36+
37+
Metrics/LineLength:
38+
Max: 251 # TODO: Lower to 80
39+
40+
Metrics/MethodLength:
41+
Max: 106 # TODO: Lower to 10
42+
43+
Metrics/PerceivedComplexity:
44+
Max: 9 # TODO: Lower to 7
45+
46+
Style/AlignParameters:
47+
EnforcedStyle: with_fixed_indentation
48+
49+
Style/ClassAndModuleChildren:
50+
EnforcedStyle: nested
51+
52+
Style/Documentation:
53+
Enabled: false
54+
55+
Style/MissingElse:
56+
Enabled: true
57+
EnforcedStyle: case
58+
59+
Style/EmptyElse:
60+
EnforcedStyle: empty
61+
62+
Style/FrozenStringLiteralComment:
63+
Enabled: true
64+
EnforcedStyle: always
65+
66+
Style/MultilineOperationIndentation:
67+
EnforcedStyle: indented
68+
69+
Style/BlockDelimiters:
70+
Enabled: true
71+
EnforcedStyle: line_count_based
72+
73+
Style/SignalException:
74+
EnforcedStyle: semantic
75+
76+
Style/TrailingCommaInLiteral:
77+
EnforcedStyleForMultiline: no_comma
78+
79+
Style/ConditionalAssignment:
80+
Enabled: false
81+
82+
Style/DotPosition:
83+
EnforcedStyle: leading
84+
85+
########## test_helper.rb sanity
86+
Style/EndBlock:
87+
Exclude:
88+
- test/test_helper.rb
89+
90+
Style/SpecialGlobalVars:
91+
Exclude:
92+
- test/test_helper.rb
93+
94+
Style/GlobalVars:
95+
Exclude:
96+
- test/test_helper.rb
97+
98+
Style/AndOr:
99+
Exclude:
100+
- test/test_helper.rb
101+
- 'lib/active_model/serializer/lint.rb'
102+
103+
Style/Not:
104+
Exclude:
105+
- test/test_helper.rb
106+
107+
Style/ClassCheck:
108+
Exclude:
109+
- test/test_helper.rb

0 commit comments

Comments
 (0)