2023-01-29 18:39:31 -05:00
|
|
|
name: Ruby Linting
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches-ignore:
|
|
|
|
- 'dependabot/**'
|
2023-06-06 04:42:23 -04:00
|
|
|
- 'renovate/**'
|
2023-01-29 18:39:31 -05:00
|
|
|
paths:
|
|
|
|
- 'Gemfile*'
|
2023-02-16 01:33:50 -05:00
|
|
|
- '.rubocop*.yml'
|
|
|
|
- '.ruby-version'
|
2023-07-11 09:23:57 -04:00
|
|
|
- 'config/brakeman.ignore'
|
2023-01-29 18:39:31 -05:00
|
|
|
- '**/*.rb'
|
|
|
|
- '**/*.rake'
|
|
|
|
- '.github/workflows/lint-ruby.yml'
|
|
|
|
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- 'Gemfile*'
|
2023-02-16 01:33:50 -05:00
|
|
|
- '.rubocop*.yml'
|
|
|
|
- '.ruby-version'
|
2023-07-11 09:23:57 -04:00
|
|
|
- 'config/brakeman.ignore'
|
2023-01-29 18:39:31 -05:00
|
|
|
- '**/*.rb'
|
|
|
|
- '**/*.rake'
|
|
|
|
- '.github/workflows/lint-ruby.yml'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
2023-02-16 01:33:50 -05:00
|
|
|
|
2023-01-29 18:39:31 -05:00
|
|
|
steps:
|
2023-02-16 01:33:50 -05:00
|
|
|
- name: Clone repository
|
2023-09-11 04:41:26 -04:00
|
|
|
uses: actions/checkout@v4
|
2023-02-16 01:33:50 -05:00
|
|
|
|
2023-10-24 07:43:24 -04:00
|
|
|
- name: Set up Ruby environment
|
|
|
|
uses: ./.github/actions/setup-ruby
|
2023-01-29 18:39:31 -05:00
|
|
|
|
2023-02-16 01:33:50 -05:00
|
|
|
- name: Set-up RuboCop Problem Matcher
|
2023-01-29 18:39:31 -05:00
|
|
|
uses: r7kamura/rubocop-problem-matchers-action@v1
|
|
|
|
|
|
|
|
- name: Run rubocop
|
2023-02-16 01:33:50 -05:00
|
|
|
run: bundle exec rubocop
|
2023-02-18 06:49:09 -05:00
|
|
|
|
2023-07-11 09:23:57 -04:00
|
|
|
- name: Run brakeman
|
|
|
|
if: always() # Run both checks, even if the first failed
|
|
|
|
run: bundle exec brakeman
|