2023-01-29 15:39:31 -08:00
|
|
|
name: Ruby Linting
|
|
|
|
on:
|
2024-07-07 02:39:31 -07:00
|
|
|
merge_group:
|
2023-01-29 15:39:31 -08:00
|
|
|
push:
|
2024-07-07 02:39:31 -07:00
|
|
|
branches:
|
|
|
|
- 'main'
|
|
|
|
- 'stable-*'
|
2023-01-29 15:39:31 -08:00
|
|
|
paths:
|
|
|
|
- 'Gemfile*'
|
2023-02-15 22:33:50 -08:00
|
|
|
- '.rubocop*.yml'
|
|
|
|
- '.ruby-version'
|
2023-07-11 06:23:57 -07:00
|
|
|
- 'config/brakeman.ignore'
|
2023-01-29 15:39:31 -08:00
|
|
|
- '**/*.rb'
|
|
|
|
- '**/*.rake'
|
|
|
|
- '.github/workflows/lint-ruby.yml'
|
|
|
|
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- 'Gemfile*'
|
2023-02-15 22:33:50 -08:00
|
|
|
- '.rubocop*.yml'
|
|
|
|
- '.ruby-version'
|
2023-07-11 06:23:57 -07:00
|
|
|
- 'config/brakeman.ignore'
|
2023-01-29 15:39:31 -08:00
|
|
|
- '**/*.rb'
|
|
|
|
- '**/*.rake'
|
|
|
|
- '.github/workflows/lint-ruby.yml'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
2023-02-15 22:33:50 -08:00
|
|
|
|
2024-06-13 06:23:32 -07:00
|
|
|
env:
|
|
|
|
BUNDLE_ONLY: development
|
|
|
|
|
2023-01-29 15:39:31 -08:00
|
|
|
steps:
|
2023-02-15 22:33:50 -08:00
|
|
|
- name: Clone repository
|
2023-09-11 01:41:26 -07:00
|
|
|
uses: actions/checkout@v4
|
2023-02-15 22:33:50 -08:00
|
|
|
|
2024-06-13 06:23:32 -07:00
|
|
|
- name: Set up Ruby
|
|
|
|
uses: ruby/setup-ruby@v1
|
|
|
|
with:
|
|
|
|
bundler-cache: true
|
2023-01-29 15:39:31 -08:00
|
|
|
|
2023-02-15 22:33:50 -08:00
|
|
|
- name: Set-up RuboCop Problem Matcher
|
2023-01-29 15:39:31 -08:00
|
|
|
uses: r7kamura/rubocop-problem-matchers-action@v1
|
|
|
|
|
|
|
|
- name: Run rubocop
|
2024-06-13 07:27:17 -07:00
|
|
|
run: bin/rubocop
|
2023-02-18 03:49:09 -08:00
|
|
|
|
2023-07-11 06:23:57 -07:00
|
|
|
- name: Run brakeman
|
|
|
|
if: always() # Run both checks, even if the first failed
|
2024-06-13 08:07:02 -07:00
|
|
|
run: bin/brakeman
|