forked from github/explore
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (31 loc) · 872 Bytes
/
pull_request.yml
File metadata and controls
33 lines (31 loc) · 872 Bytes
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
name: CI/Rubocop
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: 2.7
- name: Install bundler
run: |
gem install bundler:2.1.4
bundle config path vendor/bundle
- name: Cache gems
uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Install gems
if: steps.cache.outputs.cache-hit != 'true'
run: bundle install --jobs 4 --retry 3
- name: Build and test with Rake/Rubocop
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
bundle exec rake
bundle exec rubocop --display-cop-names