1
0

lint-ruby.yml 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. name: Ruby Linting
  2. on:
  3. merge_group:
  4. push:
  5. branches:
  6. - 'main'
  7. - 'stable-*'
  8. paths:
  9. - 'Gemfile*'
  10. - '.rubocop*.yml'
  11. - '.ruby-version'
  12. - 'config/brakeman.ignore'
  13. - '**/*.rb'
  14. - '**/*.rake'
  15. - '.github/workflows/lint-ruby.yml'
  16. pull_request:
  17. paths:
  18. - 'Gemfile*'
  19. - '.rubocop*.yml'
  20. - '.ruby-version'
  21. - 'config/brakeman.ignore'
  22. - '**/*.rb'
  23. - '**/*.rake'
  24. - '.github/workflows/lint-ruby.yml'
  25. jobs:
  26. lint:
  27. runs-on: ubuntu-latest
  28. env:
  29. BUNDLE_ONLY: development
  30. steps:
  31. - name: Clone repository
  32. uses: actions/checkout@v4
  33. - name: Set up Ruby
  34. uses: ruby/setup-ruby@v1
  35. with:
  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: bin/rubocop
  41. - name: Run brakeman
  42. if: always() # Run both checks, even if the first failed
  43. run: bin/brakeman