Skip to content

Commit

Permalink
foo
Browse files Browse the repository at this point in the history
  • Loading branch information
bschonec committed May 20, 2024
1 parent bd4a75c commit e413c48
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 61 deletions.
5 changes: 4 additions & 1 deletion .fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
fixtures:
repositories:
stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib.git"
stdlib:
repo: "https://github.com/puppetlabs/puppetlabs-stdlib.git"
puppet_version: "< 9.0.0"
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"
Expand All @@ -11,5 +13,6 @@ fixtures:
repo: "https://github.com/puppetlabs/puppetlabs-mount_core.git"
puppet_version: ">= 6.0.0"
transition: "https://github.com/puppetlabs/puppetlabs-transition.git"
filepath: "https://github.com/EdgeJ/puppet-filepath.git"
symlinks:
"nfs": "#{source_dir}"
60 changes: 10 additions & 50 deletions .github/workflows/test-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ on:
jobs:
test-static-current:
strategy:
fail-fast: true
fail-fast: false
matrix:
puppet: [7.22.0]
ruby: [2.7.7, 3.0.5, 3.1.3]
puppet: [7.0.0, 8.2.0]
ruby: [3.1.3, 3.2.0]

name: Static code analysis
runs-on: ubuntu-20.04
name: Static code analysis new
runs-on: ubuntu-latest
permissions:
contents: read

Expand Down Expand Up @@ -50,58 +50,17 @@ jobs:
run: |
PUPPET_VERSION=${{ matrix.puppet }} bundle exec rake rubocop
test-static-old:
strategy:
fail-fast: true
matrix:
puppet: [5.5.22, 6.29.0]
ruby: [2.7.0]

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: [puppet6, puppet7]
puppet: [7.0.0, 8.0.0]
beakerset: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04, centos-7, debian-10, debian-11]

name: Integration tests
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
permissions:
contents: read

Expand All @@ -111,7 +70,7 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6.9
ruby-version: 2.7
bundler-cache: true
env:
BEAKER_set: ${{ matrix.beakerset }}
Expand All @@ -125,3 +84,4 @@ jobs:
BEAKER_set: ${{ matrix.beakerset }}
BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet }}
PUPPET_INSTALL_TYPE: agent

5 changes: 4 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -571,4 +571,7 @@ Style/MixinUsage:
Enabled: false

EmptyExampleGroup:
Enabled: false
Enabled: false

inherit_gem:
voxpupuli-test: rubocop.yml
18 changes: 10 additions & 8 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -58,5 +58,7 @@ end

puppetversion = ENV['PUPPET_VERSION'].nil? ? '~> 4.0' : ENV['PUPPET_VERSION'].to_s
gem 'puppet', puppetversion, require: false, groups: [:test]
gem 'voxpupuli-test'
gem 'voxpupuli-acceptance'

# vim:ft=ruby
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ 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'

Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -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":">= 4.5.0 < 9.0.0"},
{"name":"puppetlabs/stdlib","version_requirement":">= 7.0.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"},
Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
end

require 'puppetlabs_spec_helper/module_spec_helper'
require 'voxpupuli/test/spec_helper'
require 'rspec-puppet-facts'
include RspecPuppetFacts

Expand Down
3 changes: 3 additions & 0 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# frozen_string_literal: true
require 'voxpupuli/acceptance/spec_helper_acceptance'

configure_beaker

RSpec.configure do |c|
c.mock_with :rspec
Expand Down

0 comments on commit e413c48

Please sign in to comment.