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/.packit.yaml b/.packit.yaml deleted file mode 100644 index bb4a0b25..00000000 --- a/.packit.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# See the documentation for more information: -# https://packit.dev/docs/configuration/ - -specfile_path: foreman-installer.spec - -# add or remove files that should be synced -files_to_sync: - - foreman-installer.spec - - .packit.yaml - -# name in upstream package repository or registry (e.g. in PyPI) -upstream_package_name: foreman-installer -# downstream (Fedora) RPM package name -downstream_package_name: foreman-installer - -upstream_tag_template: "{version}" - -actions: - post-upstream-clone: - - "wget https://raw.githubusercontent.com/theforeman/foreman-packaging/rpm/develop/packages/foreman/foreman-installer/foreman-installer.spec -O foreman-installer.spec" - get-current-version: - - "sed 's/-develop//' VERSION" - create-archive: - - bundle config set --local path vendor/bundle - - bundle config set --local without development:test - - bundle install - - bundle exec rake pkg:generate_source - - bash -c "ls -1t pkg/*.tar.bz2 | head -n 1" - -jobs: - - job: copr_build - trigger: pull_request - targets: - rhel-8: - additional_modules: "foreman:el8" - additional_repos: - - https://yum.theforeman.org/releases/nightly/el8/x86_64/ - - https://yum.puppet.com/puppet7/el/8/x86_64/ - rhel-9: - additional_repos: - - https://yum.theforeman.org/releases/nightly/el9/x86_64/ - - https://yum.puppet.com/puppet7/el/9/x86_64/ - module_hotfixes: true - -srpm_build_deps: - - wget - - make - - gcc - - ruby - - ruby-devel - - rubygem-bundler 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