-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #208 from puppetlabs/CONT-867-ruby_3
(CONT-867) Ruby 3 / Puppet 8 Support
- Loading branch information
Showing
23 changed files
with
1,128 additions
and
564 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# This exists so we can force the acceptance tests to run under | ||
# powershell.exe. | ||
# | ||
# For such a small edge case it does not seem sensible adding extra | ||
# complication in to the shared actions at this point. | ||
# | ||
# Hopefully this is only a temporary work-around. | ||
name: "Gem Acceptance" | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
ruby_version: | ||
description: "The target Ruby version." | ||
required: false | ||
default: "2.7" | ||
type: "string" | ||
puppet_version: | ||
description: "The target Puppet version." | ||
required: false | ||
default: "puppet7-nightly" | ||
type: "string" | ||
rake_task: | ||
description: "The name of the rake task that executes acceptance tests" | ||
required: false | ||
default: "acceptance" | ||
type: "string" | ||
runs_on: | ||
description: "The operating system used for the runner." | ||
required: false | ||
default: "ubuntu-latest" | ||
type: "string" | ||
|
||
jobs: | ||
acceptance: | ||
name: "acceptance" | ||
runs-on: ${{ inputs.runs_on }} | ||
|
||
env: | ||
PUPPET_GEM_VERSION: ${{ inputs.puppet_version }} | ||
|
||
steps: | ||
|
||
- name: "checkout" | ||
uses: "actions/checkout@v3" | ||
|
||
- name: "export environment" | ||
run: | | ||
echo "PUPPET_GEM_VERSION=${{ inputs.puppet_gem_version }} >> $GITHUB_ENV" | ||
- name: "setup ruby" | ||
uses: "ruby/setup-ruby@v1" | ||
with: | ||
ruby-version: ${{ inputs.ruby_version }} | ||
bundler-cache: true | ||
|
||
- name: "bundle environment" | ||
run: | | ||
echo ::group::bundler environment | ||
bundle env | ||
echo ::endgroup:: | ||
- name: "execute acceptance tests" | ||
shell: powershell | ||
run: | | ||
# This generic task to run acceptance tests. | ||
# It should be overridden in the Rakefile. | ||
bundle exec rake ${{ inputs.rake_task }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,19 @@ | ||
Gemspec/RequiredRubyVersion: | ||
Enabled: false | ||
Layout/EndOfLine: | ||
Description: Don't enforce CRLF on Windows. | ||
Enabled: false | ||
Metrics/LineLength: | ||
Description: People have wide screens, use them. | ||
Max: 200 | ||
Metrics/BlockLength: | ||
Enabled: false | ||
Metrics/MethodLength: | ||
Enabled: false | ||
Metrics/ClassLength: | ||
Enabled: false | ||
Metrics/PerceivedComplexity: | ||
Enabled: false | ||
Metrics/CyclomaticComplexity: | ||
Enabled: false | ||
Metrics/AbcSize: | ||
Enabled: false | ||
inherit_from: .rubocop_todo.yml | ||
|
||
# requires 2.3's squiggly HEREDOC support, which we can't use, yet | ||
# see http://www.virtuouscode.com/2016/01/06/about-the-ruby-squiggly-heredoc-syntax/ | ||
Layout/HeredocIndentation: | ||
Enabled: false | ||
# Need to ignore rubocop complaining about the name of the library. | ||
Naming/FileName: | ||
require: | ||
- rubocop-performance | ||
- rubocop-rspec | ||
|
||
AllCops: | ||
Exclude: | ||
- lib/ruby-pwsh.rb | ||
Style/RescueStandardError: | ||
Enabled: false | ||
Style/ExpandPathArguments: | ||
Enabled: false | ||
Style/Documentation: | ||
Enabled: false | ||
- Gemfile | ||
- Rakefile | ||
- spec/fixtures/**/* | ||
- vendor/bundle/**/* | ||
NewCops: enable | ||
SuggestExtensions: false | ||
TargetRubyVersion: '2.7' | ||
|
||
# Disabled | ||
Style/ClassAndModuleChildren: | ||
Exclude: | ||
- lib/puppet/provider/dsc_base_provider/dsc_base_provider.rb | ||
Style/ClassVars: | ||
Exclude: | ||
- lib/puppet/provider/dsc_base_provider/dsc_base_provider.rb | ||
Enabled: false |
Oops, something went wrong.