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