From 212be2268402ab93861572044d87a1d61185436c Mon Sep 17 00:00:00 2001 From: Felix Schizlein Date: Tue, 6 Feb 2024 17:31:46 +0100 Subject: [PATCH] Adding shell linting + fixing check-version-matches.rb --- .github/workflows/lint-unit.yml | 9 ++++++--- ci/check-version-matches.rb | 5 +---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/lint-unit.yml b/.github/workflows/lint-unit.yml index 634e429de..e6249533a 100644 --- a/.github/workflows/lint-unit.yml +++ b/.github/workflows/lint-unit.yml @@ -38,9 +38,7 @@ jobs: --health-retries=3 steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 + - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 @@ -53,6 +51,11 @@ jobs: sudo mkdir -p /var/lib/rmt ruby -e "require 'yaml'; puts({'database_test'=>{'host' => '127.0.0.1', 'port' => 3306, 'username'=>'rmt','password'=>'rmt','database'=>'rmt_test','adapter'=>'mysql2','encoding'=>'utf8','timeout'=>5000,'pool'=>5}}.to_yaml)" > config/rmt.local.yml + - name: Run Shell lint + uses: azohra/shell-linter@latest + with: + path: "ci/rmt-*" + - name: Run Lint run: | bundle exec rubocop -D diff --git a/ci/check-version-matches.rb b/ci/check-version-matches.rb index f81088c2d..10fd87015 100755 --- a/ci/check-version-matches.rb +++ b/ci/check-version-matches.rb @@ -15,10 +15,7 @@ def spec_version end def rmt_version - @rmt_version ||= (require_relative 'lib/rmt' and RMT::VERSION) - - require_relative '../lib/rmt' - @rmt_version = RMT::VERSION + @rmt_version ||= (require_relative '../lib/rmt' and RMT::VERSION) end def failure(msg)