From 056f0554dd6cf96217a5f4dc7f0ba31539730686 Mon Sep 17 00:00:00 2001 From: Max Melentiev Date: Sat, 30 Dec 2023 21:10:41 +0600 Subject: [PATCH] Run rubocop in github actions rather than in codeclimate --- .codeclimate.yml | 4 ---- .github/workflows/ci.yml | 18 +++++++++--------- .rubocop.yml | 1 + spec/telegram/bot/config_methods_spec.rb | 3 ++- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/.codeclimate.yml b/.codeclimate.yml index 25fc0fd..63761a9 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -2,7 +2,3 @@ checks: method-complexity: config: threshold: 6 # should be just fine - -plugins: - rubocop: - enabled: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d9f39b0..f4084e0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,15 +3,15 @@ name: Lint & Test on: [push, pull_request] jobs: - # lint: - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - # - uses: ruby/setup-ruby@v1 - # with: - # ruby-version: '3.0' - # bundler-cache: true - # - run: bundle exec rubocop + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.2' + bundler-cache: true + - run: bundle exec rubocop test: runs-on: ubuntu-latest diff --git a/.rubocop.yml b/.rubocop.yml index 5dce8eb..4c21695 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -7,6 +7,7 @@ AllCops: Exclude: - gemfiles/* - tmp/* + - vendor/**/* # for github actions Gemspec/DevelopmentDependencies: {Enabled: false} diff --git a/spec/telegram/bot/config_methods_spec.rb b/spec/telegram/bot/config_methods_spec.rb index e946378..0d8ab77 100644 --- a/spec/telegram/bot/config_methods_spec.rb +++ b/spec/telegram/bot/config_methods_spec.rb @@ -27,7 +27,8 @@ context 'when bot is not configured' do let(:config) { super().except(:default) } - it { should raise_error(/bot is not configured/) } + it { should + raise_error(/bot is not configured/) } end end