Skip to content

Commit aeb6ca1

Browse files
authored
Merge pull request #474 from Valantin/fix-test
Fix CI
2 parents 8cbff15 + 8c7887c commit aeb6ca1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1603
-2722
lines changed

.github/CONTRIBUTING.md

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -131,19 +131,29 @@ You can install all needed gems for spec tests into the modules directory by
131131
running:
132132

133133
```sh
134-
bundle install --path .vendor/ --without development system_tests release --jobs "$(nproc)"
134+
bundle config set --local path '.vendor/'
135+
bundle config set --local without 'development system_tests release'
136+
bundle install --jobs "$(nproc)"
135137
```
136138

137139
If you also want to run acceptance tests:
138140

139141
```sh
140-
bundle install --path .vendor/ --with system_tests --without development release --jobs "$(nproc)"
142+
bundle config set --local path '.vendor/'
143+
bundle config set --local without 'development release'
144+
bundle config set --local with 'system_tests'
145+
bundle install --jobs "$(nproc)"
141146
```
142147

143148
Our all in one solution if you don't know if you need to install or update gems:
144149

145150
```sh
146-
bundle install --path .vendor/ --with system_tests --without development release --jobs "$(nproc)"; bundle update; bundle clean
151+
bundle config set --local path '.vendor/'
152+
bundle config set --local without 'development release'
153+
bundle config set --local with 'system_tests'
154+
bundle install --jobs "$(nproc)"
155+
bundle update
156+
bundle clean
147157
```
148158

149159
As an alternative to the `--jobs "$(nproc)` parameter, you can set an
@@ -232,18 +242,29 @@ simple tests against it after applying the module. You can run this
232242
with:
233243

234244
```sh
235-
BEAKER_setfile=debian11-64 bundle exec rake beaker
245+
BEAKER_PUPPET_COLLECTION=puppet7 BEAKER_setfile=debian11-64 bundle exec rake beaker
236246
```
237247

238-
You can replace the string `debian10` with any common operating system.
248+
or
249+
250+
```sh
251+
BEAKER_PUPPET_COLLECTION=none BEAKER_setfile=archlinux-64 bundle exec rake beaker
252+
```
253+
254+
This latter example will use the distribution's own version of Puppet.
255+
256+
You can replace the string `debian11` with any common operating system.
239257
The following strings are known to work:
240258

241-
* ubuntu1804
242259
* ubuntu2004
243-
* debian10
260+
* ubuntu2204
244261
* debian11
245-
* centos7
246-
* centos8
262+
* debian12
263+
* centos9
264+
* archlinux
265+
* almalinux8
266+
* almalinux9
267+
* fedora36
247268

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

.github/SECURITY.md

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
---
12
# Managed by modulesync - DO NOT EDIT
23
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
34

4-
--format documentation
5-
--color
5+
skip-changelog:
6+
- head-branch: ['^release-*', 'release']

.github/release.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
# Managed by modulesync - DO NOT EDIT
3+
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
4+
5+
# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes
6+
7+
changelog:
8+
exclude:
9+
labels:
10+
- duplicate
11+
- invalid
12+
- modulesync
13+
- question
14+
- skip-changelog
15+
- wont-fix
16+
- wontfix
17+
18+
categories:
19+
- title: Breaking Changes 🛠
20+
labels:
21+
- backwards-incompatible
22+
23+
- title: New Features 🎉
24+
labels:
25+
- enhancement
26+
27+
- title: Bug Fixes 🐛
28+
labels:
29+
- bug
30+
31+
- title: Documentation Updates 📚
32+
labels:
33+
- documentation
34+
- docs
35+
36+
- title: Dependency Updates ⬆️
37+
labels:
38+
- dependencies
39+
40+
- title: Other Changes
41+
labels:
42+
- "*"

.github/workflows/ci.yml

Lines changed: 12 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -4,97 +4,21 @@
44

55
name: CI
66

7-
on: pull_request
7+
# yamllint disable-line rule:truthy
8+
on:
9+
pull_request: {}
10+
push:
11+
branches:
12+
- main
13+
- master
814

915
concurrency:
1016
group: ${{ github.ref_name }}
1117
cancel-in-progress: true
1218

1319
jobs:
14-
setup_matrix:
15-
name: 'Setup Test Matrix'
16-
runs-on: ubuntu-latest
17-
timeout-minutes: 40
18-
outputs:
19-
beaker_setfiles: ${{ steps.get-outputs.outputs.beaker_setfiles }}
20-
puppet_major_versions: ${{ steps.get-outputs.outputs.puppet_major_versions }}
21-
puppet_unit_test_matrix: ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }}
22-
env:
23-
BUNDLE_WITHOUT: development:system_tests:release
24-
steps:
25-
- uses: actions/checkout@v2
26-
- name: Setup ruby
27-
uses: ruby/setup-ruby@v1
28-
with:
29-
ruby-version: '3.0'
30-
bundler-cache: true
31-
- name: Run static validations
32-
run: bundle exec rake validate lint check
33-
- name: Run rake rubocop
34-
run: bundle exec rake rubocop
35-
- name: Setup Test Matrix
36-
id: get-outputs
37-
run: bundle exec metadata2gha --use-fqdn --pidfile-workaround false
38-
39-
unit:
40-
needs: setup_matrix
41-
runs-on: ubuntu-latest
42-
timeout-minutes: 40
43-
strategy:
44-
fail-fast: false
45-
matrix:
46-
include: ${{fromJson(needs.setup_matrix.outputs.puppet_unit_test_matrix)}}
47-
env:
48-
BUNDLE_WITHOUT: development:system_tests:release
49-
PUPPET_VERSION: "~> ${{ matrix.puppet }}.0"
50-
name: Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }})
51-
steps:
52-
- uses: actions/checkout@v2
53-
- name: Setup ruby
54-
uses: ruby/setup-ruby@v1
55-
with:
56-
ruby-version: ${{ matrix.ruby }}
57-
bundler-cache: true
58-
- name: Run tests
59-
run: bundle exec rake parallel_spec
60-
61-
acceptance:
62-
needs: setup_matrix
63-
runs-on: ubuntu-latest
64-
env:
65-
BUNDLE_WITHOUT: development:test:release
66-
strategy:
67-
fail-fast: false
68-
matrix:
69-
setfile:
70-
- name: CentOS 8
71-
value: centos8-64vpnserver.ma{hostname=vpnserver}-centos8-64vpnclienta.a{hostname=vpnclienta}
72-
- name: Debian 11
73-
value: debian11-64vpnserver.ma{hostname=vpnserver}-debian11-64vpnclienta.a{hostname=vpnclienta}
74-
- name: Ubuntu 20.04
75-
value: ubuntu2004-64vpnserver.ma{hostname=vpnserver}-ubuntu2004-64vpnclienta.a{hostname=vpnclienta}
76-
- name: Ubuntu 22.04
77-
value: ubuntu2204-64vpnserver.ma{hostname=vpnserver}-ubuntu2204-64vpnclienta.a{hostname=vpnclienta}
78-
puppet: ${{fromJson(needs.setup_matrix.outputs.puppet_major_versions)}}
79-
name: ${{ matrix.puppet.name }} - ${{ matrix.setfile.name }}
80-
steps:
81-
- uses: actions/checkout@v2
82-
- name: Setup ruby
83-
uses: ruby/setup-ruby@v1
84-
with:
85-
ruby-version: '3.0'
86-
bundler-cache: true
87-
- name: Run tests
88-
run: bundle exec rake beaker
89-
env:
90-
BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet.collection }}
91-
BEAKER_setfile: ${{ matrix.setfile.value }}
92-
93-
tests:
94-
needs:
95-
- unit
96-
- acceptance
97-
runs-on: ubuntu-latest
98-
name: Test suite
99-
steps:
100-
- run: echo Test suite completed
20+
puppet:
21+
name: Puppet
22+
uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v3
23+
with:
24+
beaker_hosts: 'vpnserver:ma;vpnclienta:a'

.github/workflows/labeler.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
# Managed by modulesync - DO NOT EDIT
3+
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
4+
5+
name: "Pull Request Labeler"
6+
7+
# yamllint disable-line rule:truthy
8+
on:
9+
pull_request_target: {}
10+
11+
jobs:
12+
labeler:
13+
permissions:
14+
contents: read
15+
pull-requests: write
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/labeler@v5
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
# Managed by modulesync - DO NOT EDIT
3+
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
4+
5+
name: 'Prepare Release'
6+
7+
on:
8+
workflow_dispatch:
9+
inputs:
10+
version:
11+
description: 'Module version to be released. Must be a valid semver string without leading v. (1.2.3)'
12+
required: false
13+
14+
jobs:
15+
release_prep:
16+
uses: 'voxpupuli/gha-puppet/.github/workflows/prepare_release.yml@v3'
17+
with:
18+
version: ${{ github.event.inputs.version }}
19+
allowed_owner: 'voxpupuli'
20+
secrets:
21+
# Configure secrets here:
22+
# https://docs.github.com/en/actions/security-guides/encrypted-secrets
23+
github_pat: '${{ secrets.PCCI_PAT_RELEASE_PREP }}'

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
name: Release
66

7+
# yamllint disable-line rule:truthy
78
on:
89
push:
910
tags:
@@ -12,7 +13,7 @@ on:
1213
jobs:
1314
release:
1415
name: Release
15-
uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v1
16+
uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v3
1617
with:
1718
allowed_owner: 'voxpupuli'
1819
secrets:

.gitignore

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
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
24+
bolt-debug.log
25+
.rerun.json

.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: '5.3.0'
5+
modulesync_config_version: '9.5.0'

0 commit comments

Comments
 (0)