From c8b5e3f745f1084b6eb601002cc69a2bfb2a54e4 Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Wed, 20 Dec 2023 08:42:42 -0800 Subject: [PATCH 1/7] bump From 6ffb32cc93b1e04c5c3c1fb59cdca107f0e0160b Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Wed, 20 Dec 2023 08:45:10 -0800 Subject: [PATCH 2/7] disable rubocop to test branch --- .github/actions/test-ruby/action.yml | 50 ++++++++++++++-------------- .github/workflows/ci-build.yml | 2 +- .github/workflows/ci.yml | 4 +-- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/actions/test-ruby/action.yml b/.github/actions/test-ruby/action.yml index 3c261a85..aac86496 100644 --- a/.github/actions/test-ruby/action.yml +++ b/.github/actions/test-ruby/action.yml @@ -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: | @@ -81,28 +77,32 @@ runs: # 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/rubocop-run-action@v0.10.0 - with: - options: --format=RdjsonFormatter --out=reviewdog-report.json --format=progress - rdjson_formatter: ${{ inputs.REVIEWDOG }} - preserve_exitcode: false + # - name: Install Reviewdog + # if: inputs.RUBOCOP == 'true' + # uses: reviewdog/action-setup@v1 + + # - name: Generate RuboCop report + # if: inputs.RUBOCOP == 'true' + # uses: d-lebed/rubocop-run-action@v0.10.0 + # 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: 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 + - run: | + echo "hello" shell: bash - name: Split the input variable RUBY_RAKE_COMMANDS into an array and execute diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 7bd9acbc..401189bd 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8d932fc..f3e7fee5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 }} @@ -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 }} From 11058ebd26488261712adce85f7a65851e5e9ed7 Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Wed, 20 Dec 2023 08:58:11 -0800 Subject: [PATCH 3/7] point to branch --- .github/workflows/ci-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-check.yml b/.github/workflows/ci-check.yml index 3ee852d4..cb6c1529 100644 --- a/.github/workflows/ci-check.yml +++ b/.github/workflows/ci-check.yml @@ -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 From c38a5f637665c774e30ad17cf3cf6a8c5f29f029 Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Wed, 20 Dec 2023 09:07:23 -0800 Subject: [PATCH 4/7] run rubocop --- .github/actions/test-ruby/action.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/actions/test-ruby/action.yml b/.github/actions/test-ruby/action.yml index aac86496..b0207729 100644 --- a/.github/actions/test-ruby/action.yml +++ b/.github/actions/test-ruby/action.yml @@ -70,12 +70,12 @@ 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/brakeman-linter-action@v1.0.0 -# env: -# GITHUB_TOKEN: ${{github.token}} -# REPORT_PATH: tmp/brakeman.json + # - name: Publish report + # if: inputs.BRAKEMAN == 'true' + # uses: devmasx/brakeman-linter-action@v1.0.0 + # env: + # GITHUB_TOKEN: ${{github.token}} + # REPORT_PATH: tmp/brakeman.json # - name: Install Reviewdog # if: inputs.RUBOCOP == 'true' @@ -101,8 +101,10 @@ runs: # < reviewdog-report.json # shell: bash - - run: | - echo "hello" + - name: Generate RuboCop report + if: inputs.RUBOCOP == 'true' + run: | + bundle exec rubocop shell: bash - name: Split the input variable RUBY_RAKE_COMMANDS into an array and execute From c5c43892ca4e3b3392c40c89ccae11e228c0247d Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Wed, 20 Dec 2023 13:54:16 -0800 Subject: [PATCH 5/7] run rubocop --- .github/actions/test-ruby/action.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/actions/test-ruby/action.yml b/.github/actions/test-ruby/action.yml index b0207729..a770d4f5 100644 --- a/.github/actions/test-ruby/action.yml +++ b/.github/actions/test-ruby/action.yml @@ -101,6 +101,11 @@ runs: # < reviewdog-report.json # shell: bash + - name: Read RuboCop config + run: | + cat .rubocop.yml + shell: bash + - name: Generate RuboCop report if: inputs.RUBOCOP == 'true' run: | From 07c62b907271ff40525f3bab92d6bd233a7b191f Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Wed, 20 Dec 2023 14:03:20 -0800 Subject: [PATCH 6/7] run rubocop --- .github/actions/test-ruby/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/test-ruby/action.yml b/.github/actions/test-ruby/action.yml index a770d4f5..26497484 100644 --- a/.github/actions/test-ruby/action.yml +++ b/.github/actions/test-ruby/action.yml @@ -109,7 +109,7 @@ runs: - name: Generate RuboCop report if: inputs.RUBOCOP == 'true' run: | - bundle exec rubocop + bundle exec rubocop -c .rubocop.yml shell: bash - name: Split the input variable RUBY_RAKE_COMMANDS into an array and execute From b9536a1342c1bd8514184a034c594a2978b125ac Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Wed, 20 Dec 2023 15:03:30 -0800 Subject: [PATCH 7/7] run rubocop --- .github/actions/test-ruby/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/test-ruby/action.yml b/.github/actions/test-ruby/action.yml index 26497484..a770d4f5 100644 --- a/.github/actions/test-ruby/action.yml +++ b/.github/actions/test-ruby/action.yml @@ -109,7 +109,7 @@ runs: - name: Generate RuboCop report if: inputs.RUBOCOP == 'true' run: | - bundle exec rubocop -c .rubocop.yml + bundle exec rubocop shell: bash - name: Split the input variable RUBY_RAKE_COMMANDS into an array and execute