Skip to content

Commit bfcda19

Browse files
committed
temp breakout
1 parent 5c0323f commit bfcda19

File tree

2 files changed

+8
-33
lines changed

2 files changed

+8
-33
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,19 @@ on:
1212
workflow_dispatch:
1313

1414
jobs:
15+
1516
ci:
17+
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_ci.yml@maint-generic_gem_task"
18+
secrets: "inherit"
19+
20+
acceptance:
21+
needs: "ci"
1622
strategy:
1723
matrix:
1824
puppet:
1925
- "puppet6"
2026
- "puppet7"
21-
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_ci.yml@maint-generic_gem_task"
27+
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_acceptance.yml@maint-generic_gem_task"
2228
secrets: "inherit"
2329
with:
2430
target: ${{ matrix.target }}

Rakefile

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,14 @@
22

33
if Bundler.rubygems.find_name('puppet_litmus').any?
44
require 'puppet_litmus/rake_tasks'
5-
6-
# This is a _really_ horrible monkey-patch to fix up https://github.com/puppetlabs/bolt/issues/1614
7-
# Based on resolution https://github.com/puppetlabs/bolt/pull/1620
8-
# This can be removed once this is fixed, released into Bolt and into Litmus
9-
require 'bolt_spec/run'
10-
module BoltSpec
11-
module Run
12-
class BoltRunner
13-
class << self
14-
alias_method :original_with_runner, :with_runner
15-
end
16-
17-
def self.with_runner(config_data, inventory_data)
18-
original_with_runner(deep_duplicate_object(config_data), deep_duplicate_object(inventory_data)) { |runner| yield runner }
19-
end
20-
21-
# From https://github.com/puppetlabs/pdk/blob/main/lib/pdk/util.rb
22-
# Workaround for https://github.com/puppetlabs/bolt/issues/1614
23-
def self.deep_duplicate_object(object)
24-
if object.is_a?(Array)
25-
object.map { |item| deep_duplicate_object(item) }
26-
elsif object.is_a?(Hash)
27-
hash = object.dup
28-
hash.each_pair { |key, value| hash[key] = deep_duplicate_object(value) }
29-
hash
30-
else
31-
object
32-
end
33-
end
34-
end
35-
end
36-
end
375
end
386

397
require 'puppetlabs_spec_helper/tasks/fixtures'
408
require 'bundler/gem_tasks'
419
require 'puppet-lint/tasks/puppet-lint'
4210

4311
require 'rspec/core/rake_task'
12+
4413
RSpec::Core::RakeTask.new(:spec) do |t|
4514
t.exclude_pattern = "spec/acceptance/**/*.rb"
4615
end

0 commit comments

Comments
 (0)