-
-
Notifications
You must be signed in to change notification settings - Fork 49
129 lines (126 loc) · 4.3 KB
/
rubocop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# CAUTION: There's probably a way to refactor this nicely. PR welcome.
# NOTE: Reflect changes in .mergify.yml
# NOTE: When changing minimal version of Ruby or Rubocop, change all of them
name: CI
on:
push:
branches:
- master
pull_request:
jobs:
ast_specs:
name: >-
${{ matrix.title || 'Specs' }} | ${{ matrix.ruby }}
runs-on: ${{ matrix.os }}-latest
env:
# See https://github.com/tmm1/test-queue#environment-variables
TEST_QUEUE_WORKERS: 2
RUBOCOP_VERSION: none
strategy:
fail-fast: false
matrix:
os: [ ubuntu ]
ruby: [ 2.4, 2.5, 2.6, 2.7, head ]
coverage: [ null ]
modern: [ null ]
title: [ null ]
include:
- { os: windows, ruby: mingw }
- { ruby: 2.4, os: ubuntu, coverage: true, title: 'Coverage' }
- { ruby: 2.7, os: ubuntu, modern: true, title: 'Specs "modern"' }
- { ruby: jruby, os: ubuntu }
# jruby-head disabled because of: https://github.com/jruby/jruby/issues/6416
# - { ruby: jruby-head, os: ubuntu }
- { ruby: truffleruby, os: ubuntu }
- { ruby: truffleruby-head, os: ubuntu }
steps:
- name: windows misc
if: matrix.os == 'windows'
run: |
# set TMPDIR, git core.autocrlf
echo "::set-env name=TMPDIR::$env:RUNNER_TEMP"
git config --system core.autocrlf false
- name: checkout
uses: actions/checkout@v2
- name: set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: install dependencies
run: bundle install --jobs 3 --retry 3
- name: code coverage
if: matrix.coverage
uses: paambaati/codeclimate-action@v2.6.0
env:
CC_TEST_REPORTER_ID: '758a8228862932dc8afa9144c4a5bc5dfe29c2f7dde1b7734175bad49ee310e7'
COVERAGE: 'true'
with:
coverageCommand: bundle exec rake spec
debug: true
- name: set modernize mode
if: matrix.modern == true
run: echo '::set-env name=MODERNIZE::true'
- name: independence check
if: matrix.os != 'windows'
run: (! bundle exec rubocop -h 2> /dev/null) && echo 'RuboCop successfully *not* loaded for local tests'
- name: spec
if: "matrix.coverage != true && matrix.internal_investigation != true"
run: bundle exec rake spec
rubocop_specs:
name: >-
Main Gem Specs | RuboCop: ${{ matrix.rubocop }} | ${{ matrix.ruby }}
runs-on: ${{ matrix.os }}-latest
env:
# See https://github.com/tmm1/test-queue#environment-variables
TEST_QUEUE_WORKERS: 2
strategy:
fail-fast: false
matrix:
os: [ ubuntu ]
ruby: [ 2.4, 2.7 ]
rubocop: [ 'v0.92.0', master ]
internal_investigation: [ null ]
steps:
- name: checkout
uses: actions/checkout@v2
- name: set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: setup env
run: echo '::set-env name=RUBOCOP_VERSION::${{ matrix.rubocop }}'
- name: install rubocop from source for full specs
run: git clone --branch ${{ matrix.rubocop }} https://github.com/rubocop-hq/rubocop.git ../rubocop
- name: install rubocop dependencies
run: cd ../rubocop && bundle install --jobs 3 --retry 3
- name: install dependencies
run: bundle install --jobs 3 --retry 3
- name: generate lexer and parser
run: bundle exec rake generate
- name: spec
run: cd ../rubocop && bundle exec rake spec
internal_investigation:
name: >-
Coding Style | ${{ matrix.ruby }}
runs-on: ${{ matrix.os }}-latest
env:
# See https://github.com/tmm1/test-queue#environment-variables
TEST_QUEUE_WORKERS: 2
RUBOCOP_VERSION: master
strategy:
fail-fast: false
matrix:
os: [ ubuntu ]
ruby: [ 2.7 ]
rubocop: [ master ]
steps:
- name: checkout
uses: actions/checkout@v2
- name: set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: install dependencies
run: bundle install --jobs 3 --retry 3
- name: internal investigation
run: bundle exec rake generate internal_investigation