File tree Expand file tree Collapse file tree 9 files changed +78
-32
lines changed
Expand file tree Collapse file tree 9 files changed +78
-32
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on : [push, pull_request]
4+
5+ jobs :
6+ setup_matrix :
7+ name : ' Setup Test Matrix'
8+ runs-on : ubuntu-latest
9+ outputs :
10+ puppet_major_versions : ${{ steps.get-outputs.outputs.puppet_major_versions }}
11+ puppet_unit_test_matrix : ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }}
12+ env :
13+ BUNDLE_WITHOUT : development:release
14+ steps :
15+ - uses : actions/checkout@v4
16+ - name : Setup ruby
17+ uses : ruby/setup-ruby@v1
18+ with :
19+ ruby-version : ' 2.7'
20+ bundler-cache : true
21+ - name : Validate syntax of all puppet files
22+ run : bundle exec rake validate
23+ - name : Validate ruby syntax and codestyle
24+ run : bundle exec rake rubocop
25+ - name : Check puppet code style
26+ run : bundle exec rake lint
27+ - name : Setup Test Matrix
28+ id : get-outputs
29+ run : bundle exec metadata2gha --pidfile-workaround false
30+
31+ unit :
32+ needs : setup_matrix
33+ runs-on : ubuntu-latest
34+ strategy :
35+ fail-fast : false
36+ matrix :
37+ include : ${{fromJson(needs.setup_matrix.outputs.puppet_unit_test_matrix)}}
38+ env :
39+ BUNDLE_WITHOUT : docs
40+ PUPPET_VERSION : " ~> ${{ matrix.puppet }}.0"
41+ name : Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }})
42+ steps :
43+ - uses : actions/checkout@v4
44+ - name : Setup ruby
45+ uses : ruby/setup-ruby@v1
46+ with :
47+ ruby-version : ${{ matrix.ruby }}
48+ bundler-cache : true
49+ - name : Run tests
50+ run : bundle exec rake spec
Original file line number Diff line number Diff line change @@ -4,3 +4,4 @@ spec/fixtures
44.tmp
55* .lock
66pkg /
7+ vendor
Original file line number Diff line number Diff line change 1+ ---
2+ require : rubocop-rspec
3+ AllCops :
4+ NewCops : enable
5+ SuggestExtensions : false
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 66 puppetversion = [ '>= 7.1.0' ]
77end
88
9- gem 'librarian-puppet'
10- gem 'puppetlabs_spec_helper'
119gem 'rake'
12-
10+ gem 'puppet' , puppetversion
1311gem 'trocla'
1412
15- gem 'puppet' , puppetversion
16- gem 'puppet-lint'
13+ group :tests do
14+ gem 'metadata-json-lint'
15+ gem 'puppetlabs_spec_helper'
16+ gem 'puppet-lint'
17+ gem 'puppet_metadata'
18+ gem 'puppet-syntax'
19+ # This draws in rubocop and other useful gems for puppet tests
20+ gem 'voxpupuli-test'
21+ end
Original file line number Diff line number Diff line change 11# trocla
22
3- [ ![ Build Status] ( https://travis-ci.org/duritong/puppet-trocla.png )] ( https://travis-ci.org/duritong/puppet-trocla )
4-
53This is the puppet module to manage a trocla installation on the puppet
64master. It also, provides the necessary function to query trocla from puppet.
75
Original file line number Diff line number Diff line change @@ -2,22 +2,5 @@ require 'bundler'
22Bundler . require ( :rake )
33
44require 'puppetlabs_spec_helper/rake_tasks'
5- require 'puppet-lint /tasks/puppet-lint '
5+ require 'puppet-syntax /tasks/puppet-syntax '
66
7- PuppetLint . configuration . ignore_paths = [ "spec/**/*.pp" , "vendor/**/*.pp" ]
8- PuppetLint . configuration . log_format = '%{path}:%{line}:%{KIND}: %{message}'
9- PuppetLint . configuration . send ( "disable_class_inherits_from_params_class" )
10-
11- # use librarian-puppet to manage fixtures instead of .fixtures.yml
12- # offers more possibilities like explicit version management, forge downloads,...
13- task :librarian_spec_prep do
14- sh "librarian-puppet install --path=spec/fixtures/modules/"
15- pwd = `pwd` . strip
16- unless File . directory? ( "#{ pwd } /spec/fixtures/modules/trocla" )
17- sh "ln -s #{ pwd } #{ pwd } /spec/fixtures/modules/trocla"
18- end
19- end
20- task :spec_prep => :librarian_spec_prep
21-
22-
23- task :default => [ :spec , :lint ]
Original file line number Diff line number Diff line change 33 "version" : " 1.0.1" ,
44 "author" : " duritong" ,
55 "summary" : " This modules allows you to use trocla (https://github.com/duritong/trocla) from puppet." ,
6- "license" : " GPLv2 " ,
6+ "license" : " GPL-2.0-only " ,
77 "source" : " https://github.com/duritong/puppet-trocla" ,
88 "project_page" : " https://github.com/duritong/puppet-trocla" ,
99 "issues_url" : " https://github.com/duritong/puppet-trocla/issues" ,
1010 "description" : " This modules allows you use trocla lookups as puppet functions." ,
1111 "dependencies" : [
12- {"name" :" puppetlabs/stdlib" ,"version_requirement" :" >= 3.2.0" }
12+ {
13+ "name" : " puppetlabs/stdlib" ,
14+ "version_requirement" : " >= 3.2.0"
15+ }
16+ ],
17+ "requirements" : [
18+ {
19+ "name" : " puppet" ,
20+ "version_requirement" : " >= 6.0 < 9.0.0"
21+ }
1322 ]
1423}
File renamed without changes.
You can’t perform that action at this time.
0 commit comments