From 192adc19551680f80eb764d9bd01ac8760907835 Mon Sep 17 00:00:00 2001 From: Seba Gamboa Date: Mon, 14 Jun 2021 17:59:13 -0700 Subject: [PATCH 1/4] Create rubocop-analysis.yml --- .github/workflows/rubocop-analysis.yml | 47 ++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/rubocop-analysis.yml diff --git a/.github/workflows/rubocop-analysis.yml b/.github/workflows/rubocop-analysis.yml new file mode 100644 index 0000000..909565d --- /dev/null +++ b/.github/workflows/rubocop-analysis.yml @@ -0,0 +1,47 @@ +# pulled from repo +name: "Rubocop" + +on: + push: + branches: [ master ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ master ] + schedule: + - cron: '43 9 * * 3' + +jobs: + rubocop: + runs-on: ubuntu-latest + strategy: + fail-fast: false + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + # If running on a self-hosted runner, check it meets the requirements + # listed at https://github.com/ruby/setup-ruby#using-self-hosted-runners + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.6 + + # This step is not necessary if you add the gem to your Gemfile + - name: Install Code Scanning integration + run: bundle add code-scanning-rubocop --version 0.3.0 --skip-install + + - name: Install dependencies + run: bundle install + + - name: Rubocop run + run: | + bash -c " + bundle exec rubocop --require code_scanning --format CodeScanning::SarifFormatter -o rubocop.sarif + [[ $? -ne 2 ]] + " + + - name: Upload Sarif output + uses: github/codeql-action/upload-sarif@v1 + with: + sarif_file: rubocop.sarif From 1f9871149004676debf4068608141b6be0814e44 Mon Sep 17 00:00:00 2001 From: Seba Gamboa Date: Mon, 14 Jun 2021 18:03:25 -0700 Subject: [PATCH 2/4] Update rubocop-analysis.yml --- .github/workflows/rubocop-analysis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rubocop-analysis.yml b/.github/workflows/rubocop-analysis.yml index 909565d..f23a219 100644 --- a/.github/workflows/rubocop-analysis.yml +++ b/.github/workflows/rubocop-analysis.yml @@ -25,7 +25,7 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6 + ruby-version: 2.1 # This step is not necessary if you add the gem to your Gemfile - name: Install Code Scanning integration From 5755e66be8200aa26d8e4675f0c12c38fefb0fbc Mon Sep 17 00:00:00 2001 From: Seba Gamboa Date: Mon, 14 Jun 2021 18:05:33 -0700 Subject: [PATCH 3/4] Update rubocop-analysis.yml --- .github/workflows/rubocop-analysis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rubocop-analysis.yml b/.github/workflows/rubocop-analysis.yml index f23a219..dfbdce7 100644 --- a/.github/workflows/rubocop-analysis.yml +++ b/.github/workflows/rubocop-analysis.yml @@ -25,11 +25,11 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 2.1 + ruby-version: 2.6 # This step is not necessary if you add the gem to your Gemfile - name: Install Code Scanning integration - run: bundle add code-scanning-rubocop --version 0.3.0 --skip-install + run: bundle add code-scanning-rubocop --version 0.5.0 --skip-install - name: Install dependencies run: bundle install From 0a14c7cb68ff3ef367c0b07f4314a980e3401a5f Mon Sep 17 00:00:00 2001 From: Seba Gamboa Date: Mon, 14 Jun 2021 18:07:02 -0700 Subject: [PATCH 4/4] Update rubocop-analysis.yml --- .github/workflows/rubocop-analysis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rubocop-analysis.yml b/.github/workflows/rubocop-analysis.yml index dfbdce7..c87df86 100644 --- a/.github/workflows/rubocop-analysis.yml +++ b/.github/workflows/rubocop-analysis.yml @@ -25,7 +25,7 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6 + ruby-version: 2.1.2 # This step is not necessary if you add the gem to your Gemfile - name: Install Code Scanning integration