Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Provide both a minimal example and a voxpupuli-* example #38

Merged
merged 1 commit into from
Oct 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 39 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ modules (as documented in the next section). But they can also be configured to
test modules that are vendored in a controlrepository or a monorepository. See
[Working with a subdirectory](#Working-with-a-subdirectory) for details.

## Gemfile integration example
## Gemfile integration examples

Below is an annotated example Gemfile which should provide a working environment. It's the minimum needed.

Expand All @@ -30,25 +30,59 @@ end

# The test group is used for static validations and unit tests in gha-puppet's
# basic and beaker gha-puppet workflows.
# Consider using https://github.com/voxpupuli/voxpupuli-test
group :test do
# Require the latest Puppet by default unless a specific version was requested
# CI will typically set it to '~> 7.0' to get 7.x
gem 'puppet', ENV['PUPPET_GEM_VERSION'] || '>= 0', require: false
gem 'puppet', ENV.fetch('PUPPET_GEM_VERSION', '>= 0'), require: false
# Needed to build the test matrix based on metadata
gem 'puppet_metadata', '>= 1.10', '< 4', require: false
# Needed for the rake tasks
gem 'puppetlabs_spec_helper', '>= 2.16.0', '< 7', require: false
# Rubocop versions are also specific so it's recommended
# to be precise. Can be turned off via a parameter
gem 'rubocop', require: false
end

# The system_tests group is used in gha-puppet's beaker workflow.
group :system_tests do
gem 'beaker', require: false
gem 'beaker-docker', require: false
gem 'beaker-rspec', require: false
end

# The release group is used in gha-puppet's release workflow
group :release do
gem 'puppet-blacksmith', '>= 6', '< 8', require: false
end
```

It is recommended to use [voxpupuli-test](https://github.com/voxpupuli/voxpupuli-test), [voxpupuli-acceptance](https://github.com/voxpupuli/voxpupuli-acceptance), and [voxpupuli-release](https://github.com/voxpupuli/voxpupuli-release) to manage the dependencies.

```ruby
source 'https://rubygems.org'

# The development group is intended for developer tooling. CI will never install this.
group :development do
end

# The test group is used for static validations and unit tests in gha-puppet's
# basic and beaker gha-puppet workflows.
group :test do
# Require the latest Puppet by default unless a specific version was requested
# CI will typically set it to '~> 7.0' to get 7.x
gem 'puppet', ENV.fetch('PUPPET_GEM_VERSION', '>= 0'), require: false
# Needed to build the test matrix based on metadata
gem 'puppet_metadata', '~> 3.2', require: false
# metagem that pulls in all further requirements
gem 'voxpupuli-test', '~> 7.0', require: false
end

# The system_tests group is used in gha-puppet's beaker workflow.
# Consider using https://github.com/voxpupuli/voxpupuli-acceptance
group :system_tests do
gem 'voxpupuli-acceptance', '~> 2.1', require: false
end

# The release group is used in gha-puppet's release workflow
# Consider using https://github.com/voxpupuli/voxpupuli-release
group :release do
gem 'voxpupuli-release', '~> 3.0', '>= 3.0.1'
end
Expand Down