lint-ruby.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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: Install native Ruby dependencies
  31. run: sudo apt-get install -y libicu-dev libidn11-dev
  32. - name: Set up Ruby
  33. uses: ruby/setup-ruby@v1
  34. with:
  35. ruby-version: .ruby-version
  36. bundler-cache: true
  37. - name: Set-up RuboCop Problem Matcher
  38. uses: r7kamura/rubocop-problem-matchers-action@v1
  39. - name: Run rubocop
  40. run: bundle exec rubocop
  41. - name: Run brakeman
  42. if: always() # Run both checks, even if the first failed
  43. run: bundle exec brakeman