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
22on : [push]
33
44jobs :
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
1115
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
2521
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 44 branches :
55 - master
66 pull_request :
7- types : [opened, synchronize, reopened, labeled]
87
98jobs :
109 tests :
3938 - name : Run tests
4039 run : bundle exec rake
4140 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'))
4644
4745 - name : Archive artifacts
4846 uses : actions/upload-artifact@v2
You can’t perform that action at this time.
0 commit comments