lint-ruby.yml 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. name: Ruby Linting
  2. on:
  3. push:
  4. branches-ignore:
  5. - 'dependabot/**'
  6. - 'renovate/**'
  7. paths:
  8. - 'Gemfile*'
  9. - '.rubocop*.yml'
  10. - '.ruby-version'
  11. - 'config/brakeman.ignore'
  12. - '**/*.rb'
  13. - '**/*.rake'
  14. - '.github/workflows/lint-ruby.yml'
  15. pull_request:
  16. paths:
  17. - 'Gemfile*'
  18. - '.rubocop*.yml'
  19. - '.ruby-version'
  20. - 'config/brakeman.ignore'
  21. - '**/*.rb'
  22. - '**/*.rake'
  23. - '.github/workflows/lint-ruby.yml'
  24. jobs:
  25. lint:
  26. runs-on: ubuntu-latest
  27. env:
  28. BUNDLE_ONLY: development
  29. steps:
  30. - name: Clone repository
  31. uses: actions/checkout@v4
  32. - name: Set up Ruby
  33. uses: ruby/setup-ruby@v1
  34. with:
  35. bundler-cache: true
  36. - name: Set-up RuboCop Problem Matcher
  37. uses: r7kamura/rubocop-problem-matchers-action@v1
  38. - name: Run rubocop
  39. run: bin/rubocop
  40. - name: Run brakeman
  41. if: always() # Run both checks, even if the first failed
  42. run: bin/brakeman