Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions exe/matrix_from_metadata_v2
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,13 @@ if metadata.key?('requirements') && metadata['requirements'].length.positive?
next unless Gem::Requirement.create(reqs).satisfied_by?(Gem::Version.new("#{collection[:puppet_maj_version]}.9999"))

matrix[:collection] << "puppet#{collection[:puppet_maj_version]}-nightly"
spec_matrix[:include] << if collection[:puppet_maj_version] == 8
{ puppet_version: 'https://github.com/puppetlabs/puppet', ruby_version: collection[:ruby_version] }
else
{ puppet_version: "~> #{collection[:puppet_maj_version]}.0", ruby_version: collection[:ruby_version] }
end

include_version = {
8 => "~> #{collection[:puppet_maj_version]}.0",
7 => "~> #{collection[:puppet_maj_version]}.24",
6 => "~> #{collection[:puppet_maj_version]}.0"
}
spec_matrix[:include] << { puppet_version: include_version[collection[:puppet_maj_version]], ruby_version: collection[:ruby_version] }
end
end
end
Expand Down
6 changes: 3 additions & 3 deletions spec/exe/matrix_from_metadata_v2_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
].join
)
expect(github_output_content).to include(
'spec_matrix={"include":[{"puppet_version":"~> 7.0","ruby_version":2.7},{"puppet_version":"https://github.com/puppetlabs/puppet","ruby_version":3.2}]}'
'spec_matrix={"include":[{"puppet_version":"~> 7.24","ruby_version":2.7},{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
)
expect(result.stdout).to include("Created matrix with 8 cells:\n - Acceptance Test Cells: 6\n - Spec Test Cells: 2")
end
Expand Down Expand Up @@ -69,7 +69,7 @@
].join
)
expect(github_output_content).to include(
'spec_matrix={"include":[{"puppet_version":"~> 7.0","ruby_version":2.7},{"puppet_version":"https://github.com/puppetlabs/puppet","ruby_version":3.2}]}'
'spec_matrix={"include":[{"puppet_version":"~> 7.24","ruby_version":2.7},{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
)
expect(result.stdout).to include("Created matrix with 6 cells:\n - Acceptance Test Cells: 4\n - Spec Test Cells: 2")
end
Expand Down Expand Up @@ -105,7 +105,7 @@
].join
)
expect(github_output_content).to include(
'spec_matrix={"include":[{"puppet_version":"~> 7.0","ruby_version":2.7},{"puppet_version":"https://github.com/puppetlabs/puppet","ruby_version":3.2}]}'
'spec_matrix={"include":[{"puppet_version":"~> 7.24","ruby_version":2.7},{"puppet_version":"~> 8.0","ruby_version":3.2}]}'
)
expect(result.stdout).to include("Created matrix with 4 cells:\n - Acceptance Test Cells: 2\n - Spec Test Cells: 2")
end
Expand Down