Skip to content

Commit 356d9f2

Browse files
committed
Exclude system_tests group when running release prep in GH
When running in GH, don't install beaker gems and system_tests group, except for the task acceptance case. That workflow already installs libcurl4 to work around the faraday 1.x and patron issues. The GITHUB_WORKFLOW_REF contains the absolute path to the workflow file, so we're not sensitive to the workflow name changing.
1 parent 98b2860 commit 356d9f2

1 file changed

Lines changed: 18 additions & 13 deletions

File tree

Gemfile

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ group :development do
6161
gem "rubocop-ast", '< 1.43.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
6262
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
6363
gem "bigdecimal", '< 3.2.2', require: false, platforms: [:mswin, :mingw, :x64_mingw]
64+
end
65+
group :development, :release_prep do
66+
gem "puppet-strings", '~> 4.0', require: false
67+
gem "puppetlabs_spec_helper", '~> 8.0', require: false
68+
gem "puppet-blacksmith", '~> 7.0', require: false
69+
end
70+
# On GitHub Actions, only resolve system_tests gems for the task_acceptance_tests
71+
# workflow to avoid native-extension (faraday-patron/libcurl4) failures in
72+
# workflows that don't need them (release_prep, unit_tests, static_code_analysis).
73+
unless ENV['GITHUB_ACTIONS'] && !ENV.fetch('GITHUB_WORKFLOW_REF', '').include?('task_acceptance_tests.yaml')
6474
gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '~> 6.0')
6575
gem "beaker-abs", *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 1.0')
6676
gem "beaker-hostgenerator", *location_for(ENV['BEAKER_HOSTGENERATOR_VERSION'] || '~> 2.0')
@@ -70,19 +80,14 @@ group :development do
7080
gem "beaker-puppet_install_helper", require: false
7181
gem "nokogiri", require: false
7282
gem "beaker-task_helper", '~> 1.9', require: false if ENV["GEM_BOLT"]
73-
end
74-
group :development, :release_prep do
75-
gem "puppet-strings", '~> 4.0', require: false
76-
gem "puppetlabs_spec_helper", '~> 8.0', require: false
77-
gem "puppet-blacksmith", '~> 7.0', require: false
78-
end
79-
# We are overriding the default PDK template's Litmus logic in order to use the
80-
# latest Bolt in tests. See PA-7824.
81-
group :system_tests do
82-
gem "puppet_litmus", '~> 2.0', require: false, platforms: [:ruby, :x64_mingw]
83-
gem "CFPropertyList", '< 3.0.7', require: false, platforms: [:mswin, :mingw, :x64_mingw]
84-
gem "serverspec", '~> 2.41', require: false
85-
gem "voxpupuli-acceptance", '~> 3', require: false
83+
# We are overriding the default PDK template's Litmus logic in order to use the
84+
# latest Bolt in tests. See PA-7824.
85+
group :system_tests do
86+
gem "puppet_litmus", '~> 2.0', require: false, platforms: [:ruby, :x64_mingw]
87+
gem "CFPropertyList", '< 3.0.7', require: false, platforms: [:mswin, :mingw, :x64_mingw]
88+
gem "serverspec", '~> 2.41', require: false
89+
gem "voxpupuli-acceptance", '~> 3', require: false
90+
end
8691
end
8792

8893
gems = {}

0 commit comments

Comments
 (0)