Skip to content

dummy file

dummy file #9

name: PR Validations
on:
pull_request:
types:
- opened
- edited
- synchronize
jobs:
lint:
runs-on: ubuntu-latest
name: "Rubocop Lint"
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile') }}
restore-keys: |
${{ runner.os }}-gem-
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.0
- name: Install dependencies
run: bundle check || bundle install --jobs=4 --retry=3 --path vendor/bundle
- name: Run tests
run: bundle exec rubocop -l
- name: Notify on failure
if: failure()
uses: actions/github-script@v6
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '🚨 Lint failed! Please run `bundle exec rubocop -l` on your machine and fix the offences.'
})