mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
2550679621
This could prevent not install if require a confirmation action on system were is run the workflow.
34 lines
879 B
YAML
34 lines
879 B
YAML
name: RuboCop
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Ruby 2.6
|
|
uses: actions/setup-ruby@v1
|
|
with:
|
|
ruby-version: 2.6.x
|
|
- name: Install required package
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get -y install libmysqlclient-dev libpq-dev libsqlite3-dev libncurses5-dev
|
|
- name: Install bundler
|
|
run: |
|
|
gem install bundler:2.1.2
|
|
- name: Cache gems
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: vendor/bundle
|
|
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gem-
|
|
- name: Install gems
|
|
run: |
|
|
bundle config path vendor/bundle
|
|
bundle install --jobs 4 --retry 3
|
|
- name: Run RuboCop
|
|
run: bundle exec rubocop --parallel
|