File tree Expand file tree Collapse file tree 2 files changed +34
-27
lines changed Expand file tree Collapse file tree 2 files changed +34
-27
lines changed Original file line number Diff line number Diff line change @@ -2,27 +2,36 @@ name: Linter
2
2
on : [push]
3
3
4
4
jobs :
5
- # linters:
6
- # name: Linters
7
- # runs-on: ubuntu-latest
8
- # steps:
9
- # - name: Checkout code
10
- # uses: actions/checkout@v2
5
+ linters :
6
+ name : Linters
7
+ strategy :
8
+ fail-fast : false
9
+ matrix :
10
+ ruby : [ 2.7, 3.0 ]
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : Checkout code
14
+ uses : actions/checkout@v2
11
15
12
- # - name: Setup Ruby
13
- # uses: ruby/setup-ruby@v1
14
- # - name: Ruby gem cache
15
- # uses: actions/cache@v1
16
- # with:
17
- # path: vendor/bundle
18
- # key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
19
- # restore-keys: |
20
- # ${{ runner.os }}-gems-
21
- # - name: Install gems
22
- # run: |
23
- # bundle config path vendor/bundle
24
- # bundle install --jobs 4 --retry 3
16
+ - name : Setup Ruby
17
+ uses : ruby/setup-ruby@v1
18
+ with :
19
+ ruby-version : ${{ matrix.ruby }}
20
+ bundler-cache : true
25
21
26
- # - name: Run linters
27
- # run: |
28
- # bin/rubocop --parallel
22
+ - name : Ruby gem cache
23
+ uses : actions/cache@v1
24
+ with :
25
+ path : vendor/bundle
26
+ key : ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
27
+ restore-keys : |
28
+ ${{ runner.os }}-gems-
29
+
30
+ - name : Install gems
31
+ run : |
32
+ bundle config path vendor/bundle
33
+ bundle install --jobs 4 --retry 3
34
+
35
+ - name : Run linters
36
+ run : |
37
+ bundle exec rubocop --parallel
Original file line number Diff line number Diff line change 4
4
branches :
5
5
- master
6
6
pull_request :
7
- types : [opened, synchronize, reopened, labeled]
8
7
9
8
jobs :
10
9
tests :
39
38
- name : Run tests
40
39
run : bundle exec rake
41
40
if : |
42
- github.event.pull_request.draft == false ||
43
- (github.event.pull_request.draft == true &&
44
- contains(github.event.pull_request.labels.*.name, 'master') &&
45
- matrix.gemfile == 'ferrum-master')
41
+ matrix.gemfile != 'ferrum-master' ||
42
+ (matrix.gemfile == 'ferrum-master' &&
43
+ contains(github.event.pull_request.labels.*.name, 'master'))
46
44
47
45
- name : Archive artifacts
48
46
uses : actions/upload-artifact@v2
You can’t perform that action at this time.
0 commit comments