Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugging Rubocop #185

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 36 additions & 29 deletions .github/actions/test-ruby/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ runs:
env:
ENV_PATH: ${{ inputs.ENV_PATH }}

- run: |
cat .env
shell: bash

- name: Run zeitwerk chek
if: inputs.ZEITWERK == 'true'
run: |
Expand All @@ -74,35 +70,46 @@ runs:
bundle exec brakeman --skip-files bundle/ -q -w2 -f json > tmp/brakeman.json || exit 0
shell: bash

# - name: Publish report
# if: inputs.BRAKEMAN == 'true'
# uses: devmasx/[email protected]
# env:
# GITHUB_TOKEN: ${{github.token}}
# REPORT_PATH: tmp/brakeman.json

- name: Install Reviewdog
if: inputs.RUBOCOP == 'true'
uses: reviewdog/action-setup@v1
# - name: Publish report
# if: inputs.BRAKEMAN == 'true'
# uses: devmasx/[email protected]
# env:
# GITHUB_TOKEN: ${{github.token}}
# REPORT_PATH: tmp/brakeman.json

# - name: Install Reviewdog
# if: inputs.RUBOCOP == 'true'
# uses: reviewdog/action-setup@v1

# - name: Generate RuboCop report
# if: inputs.RUBOCOP == 'true'
# uses: d-lebed/[email protected]
# with:
# options: --format=RdjsonFormatter --out=reviewdog-report.json --format=progress
# rdjson_formatter: ${{ inputs.REVIEWDOG }}
# preserve_exitcode: false

# - name: Post Review
# if: inputs.REVIEWDOG == 'true' && inputs.RUBOCOP == 'true'
# env:
# REVIEWDOG_GITHUB_API_TOKEN: ${{ github.token }}
# run: |
# reviewdog \
# -reporter=github-pr-review \
# -filter-mode=added \
# -f=rdjson \
# < reviewdog-report.json
# shell: bash

- name: Read RuboCop config
run: |
cat .rubocop.yml
shell: bash

- name: Generate RuboCop report
if: inputs.RUBOCOP == 'true'
uses: d-lebed/[email protected]
with:
options: --format=RdjsonFormatter --out=reviewdog-report.json --format=progress
rdjson_formatter: ${{ inputs.REVIEWDOG }}
preserve_exitcode: false

- name: Post Review
if: inputs.REVIEWDOG == 'true' && inputs.RUBOCOP == 'true'
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ github.token }}
run: |
reviewdog \
-reporter=github-pr-review \
-filter-mode=added \
-f=rdjson \
< reviewdog-report.json
bundle exec rubocop
shell: bash

- name: Split the input variable RUBY_RAKE_COMMANDS into an array and execute
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: signalwire/actions-template
ref: main
ref: ryanwi/rubocop
path: actions

- uses: ./actions/.github/actions/gpg
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: signalwire/actions-template
ref: main
ref: ryanwi/rubocop
path: actions

- name: Up Test dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ jobs:

CHECK:
name: CI
uses: signalwire/actions-template/.github/workflows/ci-check.yml@main
uses: signalwire/actions-template/.github/workflows/ci-check.yml@ryanwi/rubocop
with:
ENVIRONMENT: ${{ inputs.ENVIRONMENT }}
PROJECT_NAME: ${{ inputs.PROJECT_NAME }}
Expand Down Expand Up @@ -209,7 +209,7 @@ jobs:
BUILD:
name: BUILD
needs: CHECK
uses: signalwire/actions-template/.github/workflows/ci-build.yml@main
uses: signalwire/actions-template/.github/workflows/ci-build.yml@ryanwi/rubocop
with:
ENVIRONMENT: ${{ inputs.ENVIRONMENT }}
PROJECT_NAME: ${{ inputs.PROJECT_NAME }}
Expand Down