From 21b64774613765d13275afca0fdc61c6e80b1245 Mon Sep 17 00:00:00 2001 From: Gabriel Nagy Date: Thu, 18 Feb 2021 15:53:50 +0200 Subject: (MODULES-10945) Do not install PDK when running PR tests Create a separate group in the Gemfile for pdk and puppet-blacksmith which are only used for releasing. In the workflow, avoid installing the release group. --- .github/workflows/daily_unit_tests_with_nightly_puppet_gem.yaml | 1 + .github/workflows/static_code_analysis.yaml | 1 + .github/workflows/unit_tests_with_nightly_puppet_gem.yaml | 1 + .github/workflows/unit_tests_with_released_puppet_gem.yaml | 1 + Gemfile | 5 ++++- 5 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/daily_unit_tests_with_nightly_puppet_gem.yaml b/.github/workflows/daily_unit_tests_with_nightly_puppet_gem.yaml index 5bd0f50..34c169d 100644 --- a/.github/workflows/daily_unit_tests_with_nightly_puppet_gem.yaml +++ b/.github/workflows/daily_unit_tests_with_nightly_puppet_gem.yaml @@ -52,6 +52,7 @@ jobs: run: | git config --global core.longpaths true bundle config set system 'true' + bundle config set --local without 'release' ${{ matrix.env_set_cmd }}PUPPET_GEM_VERSION=$(ruby -e 'puts /puppet\s+\((.+)\)/.match(`gem list -eld puppet`)[1]') bundle update --jobs 4 --retry 3 diff --git a/.github/workflows/static_code_analysis.yaml b/.github/workflows/static_code_analysis.yaml index 0a1f427..89c2cd4 100644 --- a/.github/workflows/static_code_analysis.yaml +++ b/.github/workflows/static_code_analysis.yaml @@ -30,6 +30,7 @@ jobs: - name: Prepare testing environment with bundler run: | git config --global core.longpaths true + bundle config set --local without 'release' bundle update --jobs 4 --retry 3 - name: Run commits check diff --git a/.github/workflows/unit_tests_with_nightly_puppet_gem.yaml b/.github/workflows/unit_tests_with_nightly_puppet_gem.yaml index 0b1afc0..8fad5ef 100644 --- a/.github/workflows/unit_tests_with_nightly_puppet_gem.yaml +++ b/.github/workflows/unit_tests_with_nightly_puppet_gem.yaml @@ -54,6 +54,7 @@ jobs: run: | git config --global core.longpaths true bundle config set system 'true' + bundle config set --local without 'release' ${{ matrix.env_set_cmd }}PUPPET_GEM_VERSION=$(ruby -e 'puts /puppet\s+\((.+)\)/.match(`gem list -eld puppet`)[1]') bundle update --jobs 4 --retry 3 diff --git a/.github/workflows/unit_tests_with_released_puppet_gem.yaml b/.github/workflows/unit_tests_with_released_puppet_gem.yaml index 11ddefe..61b7b4c 100644 --- a/.github/workflows/unit_tests_with_released_puppet_gem.yaml +++ b/.github/workflows/unit_tests_with_released_puppet_gem.yaml @@ -43,6 +43,7 @@ jobs: run: | git config --global core.longpaths true bundle config set system 'true' + bundle config set --local without 'release' bundle update --jobs 4 --retry 3 - name: Run unit tests diff --git a/Gemfile b/Gemfile index dd48fcc..6cc31af 100644 --- a/Gemfile +++ b/Gemfile @@ -46,8 +46,11 @@ group :system_tests do gem "beaker-hostgenerator" gem "beaker-rspec" gem "beaker-puppet", *location_for(ENV['BEAKER_PUPPET_VERSION'] || '~> 1.0') - gem "pdk", '~> 1.18', platforms: [:ruby] +end + +group :release do gem "puppet-blacksmith", '~> 3.4', require: false + gem "pdk", platforms: [:ruby] end puppet_version = ENV['PUPPET_GEM_VERSION'] -- cgit v1.2.3 From b0902c3511959ca07d726d3154eba4c8977ccd00 Mon Sep 17 00:00:00 2001 From: Gabriel Nagy Date: Thu, 18 Feb 2021 15:55:43 +0200 Subject: (maint) Pin puppet-module-gems Pin puppet-module-posix-system and puppet-module-win-system to an older version since the newer ones do not bundle some gems that we use in acceptance (i.e. beaker-module_install_helper), causing tests to fail. --- Gemfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 6cc31af..5f131ee 100644 --- a/Gemfile +++ b/Gemfile @@ -37,9 +37,10 @@ group :development do gem "puppet-strings", require: false gem "github_changelog_generator", require: false, git: 'https://github.com/skywinder/github-changelog-generator', ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018' if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2') end + group :system_tests do - gem "puppet-module-posix-system-r#{minor_version}", require: false, platforms: [:ruby] - gem "puppet-module-win-system-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw] + gem "puppet-module-posix-system-r#{minor_version}", '~> 0.5', require: false, platforms: [:ruby] + gem "puppet-module-win-system-r#{minor_version}", '~> 0.5', require: false, platforms: [:mswin, :mingw, :x64_mingw] gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '~> 4') gem "beaker-abs", *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.5') gem "beaker-pe", require: false -- cgit v1.2.3 From acec823b972d5e4593c06961da749657d97003d2 Mon Sep 17 00:00:00 2001 From: Gabriel Nagy Date: Thu, 18 Feb 2021 15:56:23 +0200 Subject: (maint) Add puppet7 and remove puppet5 from PR testing Update the workflow that tests with released Puppet gems to also test with Puppet 7. Remove testing with Puppet 5 from the workflows since it reached EOL. --- .github/workflows/daily_unit_tests_with_nightly_puppet_gem.yaml | 4 +--- .github/workflows/unit_tests_with_nightly_puppet_gem.yaml | 4 +--- .github/workflows/unit_tests_with_released_puppet_gem.yaml | 6 +++--- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/daily_unit_tests_with_nightly_puppet_gem.yaml b/.github/workflows/daily_unit_tests_with_nightly_puppet_gem.yaml index 34c169d..d027aa4 100644 --- a/.github/workflows/daily_unit_tests_with_nightly_puppet_gem.yaml +++ b/.github/workflows/daily_unit_tests_with_nightly_puppet_gem.yaml @@ -11,10 +11,8 @@ jobs: strategy: matrix: os: [ 'ubuntu-18.04', 'macos-10.15', 'windows-2016' ] - puppet_version: [ 5, 6, 7 ] + puppet_version: [ 6, 7 ] include: - - puppet_version: 5 - ruby: 2.4 - puppet_version: 6 ruby: 2.5 - puppet_version: 7 diff --git a/.github/workflows/unit_tests_with_nightly_puppet_gem.yaml b/.github/workflows/unit_tests_with_nightly_puppet_gem.yaml index 8fad5ef..e2122bd 100644 --- a/.github/workflows/unit_tests_with_nightly_puppet_gem.yaml +++ b/.github/workflows/unit_tests_with_nightly_puppet_gem.yaml @@ -13,10 +13,8 @@ jobs: strategy: matrix: os: [ 'ubuntu-18.04', 'macos-10.15', 'windows-2016' ] - puppet_version: [ 5, 6, 7 ] + puppet_version: [ 6, 7 ] include: - - puppet_version: 5 - ruby: 2.4 - puppet_version: 6 ruby: 2.5 - puppet_version: 7 diff --git a/.github/workflows/unit_tests_with_released_puppet_gem.yaml b/.github/workflows/unit_tests_with_released_puppet_gem.yaml index 61b7b4c..bd157f3 100644 --- a/.github/workflows/unit_tests_with_released_puppet_gem.yaml +++ b/.github/workflows/unit_tests_with_released_puppet_gem.yaml @@ -13,12 +13,12 @@ jobs: strategy: matrix: os: [ 'ubuntu-18.04', 'macos-10.15', 'windows-2016' ] - puppet_version: [ 5, 6 ] + puppet_version: [ 6, 7 ] include: - - puppet_version: 5 - ruby: 2.4 - puppet_version: 6 ruby: 2.5 + - puppet_version: 7 + ruby: 2.7 - os: 'ubuntu-18.04' os_type: 'Linux' -- cgit v1.2.3 From 9ce7f4840d884b8f9113b6c9e27892a87e338cfe Mon Sep 17 00:00:00 2001 From: Gabriel Nagy Date: Thu, 18 Feb 2021 15:56:54 +0200 Subject: (maint) Bump Ruby in static analysis workflow Bump Ruby version in the static code analysis workflow to 2.6, as 2.5 will be EOL soon. --- .github/workflows/static_code_analysis.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/static_code_analysis.yaml b/.github/workflows/static_code_analysis.yaml index 89c2cd4..9a132eb 100644 --- a/.github/workflows/static_code_analysis.yaml +++ b/.github/workflows/static_code_analysis.yaml @@ -12,7 +12,7 @@ jobs: name: Run checks env: - ruby_version: 2.5 + ruby_version: 2.6 extra_checks: check:symlinks check:git_ignore check:dot_underscore check:test_file runs-on: 'ubuntu-18.04' -- cgit v1.2.3