Skip to content

Commit d367f39

Browse files
authored
Merge pull request #414 from StatensPensjonskasse/fix-teste-with-modulesync-7.2.0
Fix tests with modulesync 7.3.0; allow latest dependency versions
2 parents b3d8604 + 6ec9337 commit d367f39

31 files changed

+697
-718
lines changed

.github/CONTRIBUTING.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ If you have Ruby 2.x or want a specific version of Puppet,
124124
you must set an environment variable such as:
125125

126126
```sh
127-
export PUPPET_VERSION="~> 5.5.6"
127+
export PUPPET_GEM_VERSION="~> 6.1.0"
128128
```
129129

130130
You can install all needed gems for spec tests into the modules directory by
@@ -232,19 +232,21 @@ simple tests against it after applying the module. You can run this
232232
with:
233233

234234
```sh
235-
BEAKER_setfile=debian10-x64 bundle exec rake beaker
235+
BEAKER_PUPPET_COLLECTION=puppet7 BEAKER_setfile=debian11-64 bundle exec rake beaker
236236
```
237237

238-
You can replace the string `debian10` with any common operating system.
238+
You can replace the string `debian11` with any common operating system.
239239
The following strings are known to work:
240240

241-
* ubuntu1604
242-
* ubuntu1804
243241
* ubuntu2004
244-
* debian9
245-
* debian10
242+
* ubuntu2204
243+
* debian11
246244
* centos7
247245
* centos8
246+
* centos9
247+
* almalinux8
248+
* almalinux9
249+
* fedora36
248250

249251
For more information and tips & tricks, see [voxpupuli-acceptance's documentation](https://github.com/voxpupuli/voxpupuli-acceptance#running-tests).
250252

.github/SECURITY.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 15 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -4,85 +4,20 @@
44

55
name: CI
66

7-
on: pull_request
7+
on:
8+
pull_request: {}
9+
push:
10+
branches:
11+
- main
12+
- master
813

9-
jobs:
10-
setup_matrix:
11-
name: 'Setup Test Matrix'
12-
runs-on: ubuntu-latest
13-
timeout-minutes: 40
14-
outputs:
15-
puppet_unit_test_matrix: ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }}
16-
github_action_test_matrix: ${{ steps.get-outputs.outputs.github_action_test_matrix }}
17-
env:
18-
BUNDLE_WITHOUT: development:system_tests:release
19-
steps:
20-
- uses: actions/checkout@v2
21-
- name: Setup ruby
22-
uses: ruby/setup-ruby@v1
23-
with:
24-
ruby-version: '3.0'
25-
bundler-cache: true
26-
- name: Run static validations
27-
run: bundle exec rake validate lint check
28-
- name: Run rake rubocop
29-
run: bundle exec rake rubocop
30-
- name: Setup Test Matrix
31-
id: get-outputs
32-
run: bundle exec metadata2gha --use-fqdn --pidfile-workaround false
33-
34-
unit:
35-
needs: setup_matrix
36-
runs-on: ubuntu-latest
37-
timeout-minutes: 40
38-
strategy:
39-
fail-fast: false
40-
matrix:
41-
include: ${{fromJson(needs.setup_matrix.outputs.puppet_unit_test_matrix)}}
42-
env:
43-
BUNDLE_WITHOUT: development:system_tests:release
44-
PUPPET_VERSION: "~> ${{ matrix.puppet }}.0"
45-
name: Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }})
46-
steps:
47-
- uses: actions/checkout@v2
48-
- name: Setup ruby
49-
uses: ruby/setup-ruby@v1
50-
with:
51-
ruby-version: ${{ matrix.ruby }}
52-
bundler-cache: true
53-
- name: Run tests
54-
run: bundle exec rake parallel_spec
14+
concurrency:
15+
group: ${{ github.ref_name }}
16+
cancel-in-progress: true
5517

56-
acceptance:
57-
needs: setup_matrix
58-
runs-on: ubuntu-latest
59-
env:
60-
LANG: en_US
61-
LC_ALL: en_US.UTF-8
62-
BUNDLE_WITHOUT: development:test:release
63-
strategy:
64-
fail-fast: false
65-
matrix:
66-
include: ${{fromJson(needs.setup_matrix.outputs.github_action_test_matrix)}}
67-
name: ${{ matrix.puppet.name }} - ${{ matrix.setfile.name }}
68-
steps:
69-
- uses: actions/checkout@v2
70-
- name: Setup ruby
71-
uses: ruby/setup-ruby@v1
72-
with:
73-
ruby-version: '3.0'
74-
bundler-cache: true
75-
- name: Run tests
76-
run: bundle exec rake beaker
77-
env:
78-
BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet.collection }}
79-
BEAKER_setfile: ${{ matrix.setfile.value }}
80-
81-
tests:
82-
needs:
83-
- unit
84-
- acceptance
85-
runs-on: ubuntu-latest
86-
name: Test suite
87-
steps:
88-
- run: echo Test suite completed
18+
jobs:
19+
puppet:
20+
name: Puppet
21+
uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v2
22+
with:
23+
pidfile_workaround: 'false'

.github/workflows/release.yml

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,14 @@ on:
99
tags:
1010
- '*'
1111

12-
env:
13-
BUNDLE_WITHOUT: development:test:system_tests
14-
1512
jobs:
16-
deploy:
17-
name: 'deploy to forge'
18-
runs-on: ubuntu-latest
19-
if: github.repository_owner == 'voxpupuli'
20-
steps:
21-
- name: Checkout repository
22-
uses: actions/checkout@v2
23-
- name: Setup Ruby
24-
uses: ruby/setup-ruby@v1
25-
with:
26-
ruby-version: '2.7'
27-
bundler-cache: true
28-
- name: Build and Deploy
29-
env:
30-
# Configure secrets here:
31-
# https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets
32-
BLACKSMITH_FORGE_USERNAME: '${{ secrets.PUPPET_FORGE_USERNAME }}'
33-
BLACKSMITH_FORGE_API_KEY: '${{ secrets.PUPPET_FORGE_API_KEY }}'
34-
run: bundle exec rake module:push
13+
release:
14+
name: Release
15+
uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v2
16+
with:
17+
allowed_owner: 'voxpupuli'
18+
secrets:
19+
# Configure secrets here:
20+
# https://docs.github.com/en/actions/security-guides/encrypted-secrets
21+
username: ${{ secrets.PUPPET_FORGE_USERNAME }}
22+
api_key: ${{ secrets.PUPPET_FORGE_API_KEY }}

.gitignore

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# Managed by modulesync - DO NOT EDIT
22
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
33

4-
pkg/
5-
Gemfile.lock
6-
Gemfile.local
7-
vendor/
8-
.vendor/
9-
spec/fixtures/manifests/
10-
spec/fixtures/modules/
11-
.vagrant/
12-
.bundle/
13-
.ruby-version
14-
coverage/
15-
log/
16-
.idea/
17-
.dependencies/
18-
.librarian/
19-
Puppetfile.lock
4+
/pkg/
5+
/Gemfile.lock
6+
/Gemfile.local
7+
/vendor/
8+
/.vendor/
9+
/spec/fixtures/manifests/
10+
/spec/fixtures/modules/
11+
/.vagrant/
12+
/.bundle/
13+
/.ruby-version
14+
/coverage/
15+
/log/
16+
/.idea/
17+
/.dependencies/
18+
/.librarian/
19+
/Puppetfile.lock
2020
*.iml
2121
.*.sw?
22-
.yardoc/
23-
Guardfile
22+
/.yardoc/
23+
/Guardfile

.msync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Managed by modulesync - DO NOT EDIT
33
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
44

5-
modulesync_config_version: '4.2.0'
5+
modulesync_config_version: '7.3.0'

.pmtignore

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,38 @@
11
# Managed by modulesync - DO NOT EDIT
22
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
33

4-
docs/
5-
pkg/
6-
Gemfile
7-
Gemfile.lock
8-
Gemfile.local
9-
vendor/
10-
.vendor/
11-
spec/
12-
Rakefile
13-
.vagrant/
14-
.bundle/
15-
.ruby-version
16-
coverage/
17-
log/
18-
.idea/
19-
.dependencies/
20-
.github/
21-
.librarian/
22-
Puppetfile.lock
4+
/docs/
5+
/pkg/
6+
/Gemfile
7+
/Gemfile.lock
8+
/Gemfile.local
9+
/vendor/
10+
/.vendor/
11+
/spec/
12+
/Rakefile
13+
/.vagrant/
14+
/.bundle/
15+
/.ruby-version
16+
/coverage/
17+
/log/
18+
/.idea/
19+
/.dependencies/
20+
/.github/
21+
/.librarian/
22+
/Puppetfile.lock
2323
*.iml
24-
.editorconfig
25-
.fixtures.yml
26-
.gitignore
27-
.msync.yml
28-
.overcommit.yml
29-
.pmtignore
30-
.rspec
31-
.rspec_parallel
32-
.rubocop.yml
33-
.sync.yml
24+
/.editorconfig
25+
/.fixtures.yml
26+
/.gitignore
27+
/.msync.yml
28+
/.overcommit.yml
29+
/.pmtignore
30+
/.rspec
31+
/.rspec_parallel
32+
/.rubocop.yml
33+
/.sync.yml
3434
.*.sw?
35-
.yardoc/
36-
.yardopts
37-
Dockerfile
35+
/.yardoc/
36+
/.yardopts
37+
/Dockerfile
38+
/HISTORY.md

.puppet-lint.rc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
--fail-on-warnings
2+
--no-parameter_documentation-check
3+
--no-parameter_types-check

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ WORKDIR /opt/puppet
88
# https://github.com/puppetlabs/puppet/blob/06ad255754a38f22fb3a22c7c4f1e2ce453d01cb/lib/puppet/provider/service/runit.rb#L39
99
RUN mkdir -p /etc/sv
1010

11-
ARG PUPPET_VERSION="~> 6.0"
11+
ARG PUPPET_GEM_VERSION="~> 6.0"
1212
ARG PARALLEL_TEST_PROCESSORS=4
1313

1414
# Cache gems

Gemfile

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Managed by modulesync - DO NOT EDIT
22
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
33

4-
source ENV['GEM_SOURCE'] || "https://rubygems.org"
4+
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
55

66
group :test do
7-
gem 'voxpupuli-test', '~> 2.5', :require => false
7+
gem 'voxpupuli-test', '~> 7.0', :require => false
88
gem 'coveralls', :require => false
99
gem 'simplecov-console', :require => false
10-
gem 'puppet_metadata', '~> 1.0', :require => false
10+
gem 'puppet_metadata', '~> 3.5', :require => false
1111
gem 'puppet-lint-param-docs', :require => false
1212
end
1313

@@ -17,19 +17,17 @@ group :development do
1717
end
1818

1919
group :system_tests do
20-
gem 'voxpupuli-acceptance', '~> 1.0', :require => false
20+
gem 'voxpupuli-acceptance', '~> 3.0', :require => false
2121
end
2222

2323
group :release do
24-
gem 'github_changelog_generator', '>= 1.16.1', :require => false if RUBY_VERSION >= '2.5'
25-
gem 'voxpupuli-release', '>= 1.0.2', :require => false
26-
gem 'puppet-strings', '>= 2.2', :require => false
24+
gem 'voxpupuli-release', '~> 3.0', :require => false
2725
end
2826

2927
gem 'rake', :require => false
3028
gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test]
3129

32-
puppetversion = ENV['PUPPET_VERSION'] || '>= 6.0'
30+
puppetversion = ENV['PUPPET_GEM_VERSION'] || '~> 7.24'
3331
gem 'puppet', puppetversion, :require => false, :groups => [:test]
3432

3533
# vim: syntax=ruby

0 commit comments

Comments
 (0)