diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8acbfe40..6129b393 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,17 +26,23 @@ jobs: matrix: include: - ruby: '2.7' - puppet: '7.0' + puppet: '7' - ruby: '3.0' - puppet: '7.0' + puppet: '7' - ruby: '3.2' - puppet: '8.0' + puppet: '8' env: - PUPPET_VERSION: ${{ matrix.puppet }} + BUNDLE_WITHOUT: puppet:rubocop steps: - uses: actions/checkout@v4 + - name: Set up Puppet repositories + run: | + . /etc/os-release + wget "https://apt.puppet.com/puppet${{ matrix.puppet }}-release-${VERSION_CODENAME}.deb" + sudo apt install "${PWD}/puppet${{ matrix.puppet }}-release-${VERSION_CODENAME}.deb" + sudo apt update - name: Install system dependencies - run: sudo apt-get install -y --no-install-recommends asciidoc + run: sudo apt-get install -y --no-install-recommends asciidoc puppet-agent - name: Setup ruby uses: ruby/setup-ruby@v1 with: @@ -51,6 +57,7 @@ jobs: run: bundle exec rake spec - name: Test installer configuration run: | + . /etc/profile.d/puppet-agent.sh bundle exec rake install PREFIX=./local --trace bundle exec rake installation_tests PREFIX=./local --trace diff --git a/Gemfile b/Gemfile index ce09ce51..4d453e16 100644 --- a/Gemfile +++ b/Gemfile @@ -6,8 +6,11 @@ gem 'rdoc', '< 6.4' gem 'kafo', '>= 7.3', '< 8' gem 'librarian-puppet', '>= 3.0' -gem 'puppet', ENV.key?('PUPPET_VERSION') ? "~> #{ENV['PUPPET_VERSION']}" : '~> 7.0' -gem 'facter', '>= 3.0', '!= 4.0.52' + +group :puppet do + gem 'puppet', ENV.key?('PUPPET_VERSION') ? "~> #{ENV['PUPPET_VERSION']}" : '~> 7.0' + gem 'facter', '>= 3.0', '!= 4.0.52' +end gem 'puppet-strings' gem 'rake' @@ -16,10 +19,13 @@ gem 'racc' if RUBY_VERSION >= '3.3' gem 'semverse', groups: [:development, :test] +group :rubocop do + gem 'rubocop', '~> 0.80.0' +end + group :test do gem 'rspec' gem 'rspec_junit_formatter' - gem 'rubocop', '~> 0.80.0' end group :development do