Skip to content

Commit f87972a

Browse files
committed
(maint) Update tests
This commit: - Updates Ruby versions used in GitHub Actions - Updates the Checkout action to the latest version (6) - Addresses Rubocop violations
1 parent ebf1e35 commit f87972a

File tree

5 files changed

+12
-22
lines changed

5 files changed

+12
-22
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ jobs:
1010
runs-on: ubuntu-latest
1111
if: github.repository_owner == 'puppetlabs'
1212
steps:
13-
- uses: actions/checkout@v4
14-
- name: Install Ruby 3.0
13+
- uses: actions/checkout@v6
14+
- name: Install Ruby 3.1
1515
uses: ruby/setup-ruby@v1
1616
with:
17-
ruby-version: '3.0'
17+
ruby-version: '3.1'
1818
env:
1919
BUNDLE_WITHOUT: release
2020
- name: Build gem

.github/workflows/test.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313
rubocop:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v6
1717
- name: Install Ruby ${{ matrix.ruby }}
1818
uses: ruby/setup-ruby@v1
1919
with:
20-
ruby-version: "3.0"
20+
ruby-version: '3.3'
2121
bundler-cache: true
2222
- name: Run Rubocop
2323
run: bundle exec rake rubocop
@@ -29,18 +29,14 @@ jobs:
2929
fail-fast: false
3030
matrix:
3131
include:
32-
- ruby: "2.7"
33-
- ruby: "3.0"
34-
coverage: "yes"
35-
- ruby: "3.1"
36-
- ruby: "3.2"
37-
- ruby: "3.3"
32+
- ruby: '3.1'
33+
- ruby: '3.2'
34+
- ruby: '3.3'
35+
- ruby: '3.4'
3836

39-
env:
40-
COVERAGE: ${{ matrix.coverage }}
4137
name: RSpec - Ruby ${{ matrix.ruby }}
4238
steps:
43-
- uses: actions/checkout@v4
39+
- uses: actions/checkout@v6
4440
- name: Install Ruby ${{ matrix.ruby }}
4541
uses: ruby/setup-ruby@v1
4642
with:

.rubocop_todo.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -655,12 +655,6 @@ RSpec/SpecFilePathFormat:
655655
- 'spec/beaker-puppet/install_utils/windows_utils_spec.rb'
656656
- 'spec/beaker-puppet/wrappers_spec.rb'
657657

658-
# Offense count: 1
659-
# This cop supports unsafe autocorrection (--autocorrect-all).
660-
RSpec/StringAsInstanceDoubleConstant:
661-
Exclude:
662-
- 'spec/beaker-puppet/install_utils/module_utils_spec.rb'
663-
664658
# Offense count: 88
665659
RSpec/StubbedMock:
666660
Exclude:

lib/beaker-puppet/install_utils/foss_utils.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def extract_repo_info_from(uri)
139139
def order_packages(packages_array)
140140
puppet = packages_array.select { |e| e[:name] == 'puppet' }
141141
puppet_depends_on = packages_array.select do |e|
142-
e[:name] == 'hiera' or e[:name] == 'facter'
142+
e[:name].include?('hiera') || e[:name].include?('facter')
143143
end
144144
depends_on_puppet = (packages_array - puppet) - puppet_depends_on
145145
[puppet_depends_on, puppet, depends_on_puppet].flatten

spec/beaker-puppet/install_utils/foss_utils_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ def logger
313313
subject.instance_variable_set(:@metadata, {})
314314
version = subject.find_git_repo_versions(host, path, repository)
315315

316-
expect(version).to be == { 'name' => '2' } # rubocop:ignore RSpec/Eq
316+
expect(version).to be == { 'name' => '2' } # rubocop:disable RSpec/Eq
317317
end
318318
end
319319

0 commit comments

Comments
 (0)