Skip to content

Commit 99d6806

Browse files
committed
Move rubocop to a separate CI job
We use a very old version of rubocop to support ruby 2.0, however that version is not compatible with ruby-head. Either way there's not point running rubocop on every ruby version a distinct CI job is more efficient.
1 parent 217ac2e commit 99d6806

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ jobs:
6161
run: echo 'DB=${{ matrix.db }}' >> $GITHUB_ENV
6262
- run: sudo echo "127.0.0.1 mysql2gem.example.com" | sudo tee -a /etc/hosts
6363
- run: bash ci/setup.sh
64-
- run: bundle exec rake
64+
- run: bundle exec rake spec

.github/workflows/rubocop.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: RuboCop
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: Set up Ruby 2.4
12+
uses: ruby/setup-ruby@v1
13+
with:
14+
ruby-version: 2.4
15+
- name: Cache gems
16+
uses: actions/cache@v1
17+
with:
18+
path: vendor/bundle
19+
key: ${{ runner.os }}-rubocop-${{ hashFiles('**/Gemfile.lock') }}
20+
restore-keys: |
21+
${{ runner.os }}-rubocop-
22+
- name: Install gems
23+
run: |
24+
bundle config path vendor/bundle
25+
bundle install --jobs 4 --retry 3
26+
- name: Run RuboCop
27+
run: bundle exec rubocop

0 commit comments

Comments
 (0)