Skip to content

Commit 0095c2e

Browse files
Split out Rubocop into a dedicated job and only run once
1 parent cef194e commit 0095c2e

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,20 @@ on:
99
branches:
1010
- '*'
1111
jobs:
12+
rubocop:
13+
name: Rubocop
14+
runs-on: 'ubuntu-20.04'
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: ruby/setup-ruby@v1
18+
with:
19+
ruby-version: '3.0'
20+
- run: script/update_rubygems_and_install_bundler
21+
- run: script/clone_all_rspec_repos
22+
- run: bundle install --standalone
23+
- run: bundle binstubs --all
24+
- run: script/run_rubocop
25+
1226
test:
1327
name: 'Ruby: ${{ matrix.ruby }}, Rails: ${{ matrix.env.RAILS_VERSION }}'
1428
runs-on: ubuntu-20.04

script/predicate_functions.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,3 @@ function documentation_enforced {
9797
return 1
9898
fi
9999
}
100-
101-
function style_and_lint_enforced {
102-
if [ -x ./bin/rubocop ]; then
103-
return 0
104-
else
105-
return 1
106-
fi
107-
}

script/run_build

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ if documentation_enforced; then
2626
fold "doc check" check_documentation_coverage
2727
fi
2828

29-
if style_and_lint_enforced; then
30-
fold "rubocop" check_style_and_lint
31-
fi
32-
3329
if is_mri; then
3430
fold "one-by-one specs" run_specs_one_by_one
3531
run_all_spec_suites

0 commit comments

Comments
 (0)