diff --git a/.fixtures.yml b/.fixtures.yml index f0a14617..eef120ad 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -1,8 +1,6 @@ fixtures: repositories: - stdlib: - repo: "https://github.com/puppetlabs/puppetlabs-stdlib.git" - puppet_version: "< 9.0.0" + stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib.git" concat: "https://github.com/puppetlabs/puppetlabs-concat.git" augeasproviders_core: "https://github.com/voxpupuli/puppet-augeasproviders_core.git" augeasproviders_shellvar: "https://github.com/voxpupuli/puppet-augeasproviders_shellvar.git" diff --git a/.github/workflows/test-suite.yaml b/.github/workflows/test-suite.yaml index fb665d08..0dec901b 100644 --- a/.github/workflows/test-suite.yaml +++ b/.github/workflows/test-suite.yaml @@ -11,11 +11,11 @@ jobs: strategy: fail-fast: false matrix: - puppet: [7.0.0, 8.2.0] - ruby: [3.1.3, 3.2.0] + puppet: [7.22.0] + ruby: [2.7.7, 3.0.5, 3.1.3] - name: Static code analysis new - runs-on: ubuntu-latest + name: Static code analysis + runs-on: ubuntu-20.04 permissions: contents: read @@ -50,17 +50,58 @@ jobs: run: | PUPPET_VERSION=${{ matrix.puppet }} bundle exec rake rubocop + test-static-old: + strategy: + fail-fast: false + matrix: + puppet: [5.5.22, 6.29.0] + ruby: [2.5.9, 2.6.9] + + name: Static code analysis + runs-on: ubuntu-20.04 + permissions: + contents: read + + steps: + - uses: actions/checkout@v3 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + env: + PUPPET_VERSION: ${{ matrix.puppet }} + + - name: Run metadata lint + run: | + PUPPET_VERSION=${{ matrix.puppet }} bundle exec rake metadata_lint + + - name: Run puppet lint + run: | + PUPPET_VERSION=${{ matrix.puppet }} bundle exec rake lint + + - name: Run puppet syntax check + run: | + PUPPET_VERSION=${{ matrix.puppet }} bundle exec rake syntax + + - name: Run puppet rspec tests + run: | + PUPPET_VERSION=${{ matrix.puppet }} STRICT_VARIABLES=yes bundle exec rake spec + + - name: Run rubocop tests + run: | + PUPPET_VERSION=${{ matrix.puppet }} bundle exec rake rubocop test-integration: - if: false strategy: fail-fast: false matrix: - puppet: [7.0.0, 8.0.0] + puppet: [puppet6, puppet7] beakerset: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04, centos-7, debian-10, debian-11] name: Integration tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 permissions: contents: read @@ -70,7 +111,7 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 2.7 + ruby-version: 2.6.9 bundler-cache: true env: BEAKER_set: ${{ matrix.beakerset }} @@ -84,4 +125,3 @@ jobs: BEAKER_set: ${{ matrix.beakerset }} BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet }} PUPPET_INSTALL_TYPE: agent - diff --git a/.rubocop.yml b/.rubocop.yml index c5eaddae..9b93fb3f 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -572,6 +572,3 @@ Style/MixinUsage: EmptyExampleGroup: Enabled: false - -inherit_gem: - voxpupuli-test: rubocop.yml diff --git a/Gemfile b/Gemfile index c14ddaed..c7ae4f65 100644 --- a/Gemfile +++ b/Gemfile @@ -13,14 +13,14 @@ end group :test do gem 'metadata-json-lint', require: false gem 'puppet-blacksmith', require: false, git: 'https://github.com/voxpupuli/puppet-blacksmith.git' -# gem 'puppet-lint', require: false, git: 'https://github.com/rodjek/puppet-lint.git' -# gem 'puppet-lint-absolute_classname-check', require: false -# gem 'puppet-lint-classes_and_types_beginning_with_digits-check', require: false -# gem 'puppet-lint-leading_zero-check', require: false -# gem 'puppet-lint-trailing_comma-check', require: false -# gem 'puppet-lint-unquoted_string-check', require: false -# gem 'puppet-lint-variable_contains_upcase', require: false -# gem 'puppet-lint-version_comparison-check', require: false + gem 'puppet-lint', require: false, git: 'https://github.com/rodjek/puppet-lint.git' + gem 'puppet-lint-absolute_classname-check', require: false + gem 'puppet-lint-classes_and_types_beginning_with_digits-check', require: false + gem 'puppet-lint-leading_zero-check', require: false + gem 'puppet-lint-trailing_comma-check', require: false + gem 'puppet-lint-unquoted_string-check', require: false + gem 'puppet-lint-variable_contains_upcase', require: false + gem 'puppet-lint-version_comparison-check', require: false gem 'puppet-strings', require: false gem 'puppet-syntax', require: false gem 'puppetlabs_spec_helper', require: false diff --git a/Rakefile b/Rakefile index d1d32e38..9622eb83 100644 --- a/Rakefile +++ b/Rakefile @@ -4,7 +4,6 @@ require 'puppet-syntax/tasks/puppet-syntax' require 'metadata-json-lint/rake_task' require 'puppet_blacksmith/rake_tasks' require 'voxpupuli/release/rake_tasks' -require 'voxpupuli/test/rake_tasks' require 'rubocop/rake_task' require 'puppet-strings/tasks' diff --git a/metadata.json b/metadata.json index 2d86c29d..73e352f4 100644 --- a/metadata.json +++ b/metadata.json @@ -8,7 +8,7 @@ "project_page": "https://github.com/derdanne/puppet-nfs", "issues_url": "https://github.com/derdanne/puppet-nfs/issues", "dependencies": [ - {"name":"puppetlabs/stdlib","version_requirement":">= 7.0.0 < 8.0.0"}, + {"name":"puppetlabs/stdlib","version_requirement":">= 4.5.0 < 8.0.0"}, {"name":"puppetlabs/concat","version_requirement":">= 1.1.2 < 8.0.0"}, {"name":"puppetlabs/transition","version_requirement":">= 0.1.0 < 2.0.0"}, {"name":"puppet/augeasproviders_core","version_requirement":">= 2.1.5 < 4.0.0"}, diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 56bd5434..69df60b9 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -5,7 +5,6 @@ end require 'puppetlabs_spec_helper/module_spec_helper' -require 'voxpupuli/test/spec_helper' require 'rspec-puppet-facts' include RspecPuppetFacts diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index 83e6d3dd..a3c60c2e 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -1,7 +1,4 @@ # frozen_string_literal: true -require 'voxpupuli/acceptance/spec_helper_acceptance' - -configure_beaker RSpec.configure do |c| c.mock_with :rspec