lint-ruby.yml 989 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. steps:
  28. - name: Clone repository
  29. uses: actions/checkout@v4
  30. - name: Set up Ruby environment
  31. uses: ./.github/actions/setup-ruby
  32. - name: Set-up RuboCop Problem Matcher
  33. uses: r7kamura/rubocop-problem-matchers-action@v1
  34. - name: Run rubocop
  35. run: bundle exec rubocop
  36. - name: Run brakeman
  37. if: always() # Run both checks, even if the first failed
  38. run: bundle exec brakeman