Skip to content

Commit

Permalink
Use system Puppet in CI
Browse files Browse the repository at this point in the history
This uses the official Puppet AIO packages, which is also what we use in
production. This makes the tests more realistic.
  • Loading branch information
ekohl committed May 8, 2024
1 parent 74387d2 commit 8ee2f91
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
12 changes: 9 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down

0 comments on commit 8ee2f91

Please sign in to comment.