Last active
July 27, 2023 08:01
-
-
Save klyonrad/2683016d9bd7b7d578e2950873cd28aa to your computer and use it in GitHub Desktop.
pronto_setup_gh_actions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= "inherit_from: .rubocop_todo.yml" if !ENV['NO_RUBOCOP_TODO'] %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This extra configuration file is intended to be a To Do file for pronto-rubocop | |
# So that rubocop can be gradually enforced on lines that are touched | |
inherit_from: .rubocop.yml | |
Metrics: | |
Enabled: false | |
# How programmers write: | |
# Lorem ipsum larum farum larum farum | |
# larum farum Lorem | |
# lorem ipsum larum farum | |
# How people actually read: | |
# Lorem ipsum larum farum larum farum | |
# larum farum Lorem ipsum larum | |
# lorem | |
Layout/MultilineMethodCallIndentation: | |
EnforcedStyle: indented |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lint_with_pronto: | |
# runs-on: insert your runner | |
if: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/development') }} | |
env: | |
RUBOCOP_CONFIG: ".rubocop_pronto.yml" | |
NO_RUBOCOP_TODO: "1" # Disable hiding all the offenses with a To Do file | |
steps: | |
- name: Install required OS packages | |
run: | | |
sudo apt-get install -y libgit2-dev cmake pkg-config | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # pronto needs to see the differences | |
- name: Install ruby and required gems | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
# avoid Gemfile bloat by installing extra. | |
# probably not worth the hassle int the long run | |
- name: Install pronto | |
run: gem install pronto-rubocop ruboocop-performance rubocop-rails rubocop-rspec # pronto-brakeman pronto-reek | |
- name: Run pronto | |
run: pronto run --commit=origin/development --exit-code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment