Skip to content

Commit ce81be4

Browse files
authored
Merge pull request #35 from zehweh/fix/bugs-tests-ci
Fix bugs, add spec tests and CI workflow
2 parents 866073b + 70bb5de commit ce81be4

35 files changed

Lines changed: 1541 additions & 165 deletions

.fixtures.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
---
44
fixtures:
55
forge_modules:
6-
# stdlib: "puppetlabs/stdlib"
6+
stdlib: "puppetlabs/stdlib"
7+
concat: "puppetlabs/concat"

.github/workflows/test.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Puppet Tests
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
push:
7+
branches: [master]
8+
9+
jobs:
10+
validate:
11+
name: Validate
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Install PDK
16+
run: |
17+
wget -q https://apt.puppet.com/puppet-tools-release-jammy.deb
18+
sudo dpkg -i puppet-tools-release-jammy.deb
19+
sudo apt-get update -qq
20+
sudo apt-get install -y pdk
21+
- name: PDK Validate
22+
run: pdk validate --parallel
23+
24+
unit-test:
25+
name: Unit Tests (Puppet ${{ matrix.puppet }})
26+
runs-on: ubuntu-latest
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
puppet: ['8']
31+
steps:
32+
- uses: actions/checkout@v4
33+
- name: Install PDK
34+
run: |
35+
wget -q https://apt.puppet.com/puppet-tools-release-jammy.deb
36+
sudo dpkg -i puppet-tools-release-jammy.deb
37+
sudo apt-get update -qq
38+
sudo apt-get install -y pdk
39+
- name: Run Unit Tests
40+
run: pdk test unit --puppet-version=${{ matrix.puppet }}

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,20 @@
1616
/log/
1717
/pkg/
1818
/spec/fixtures/manifests/
19-
/spec/fixtures/modules/
19+
/spec/fixtures/modules/*
2020
/tmp/
2121
/vendor/
22+
/.vendor/
2223
/convert_report.txt
2324
/update_report.txt
2425
.DS_Store
2526
.project
2627
.envrc
2728
/inventory.yaml
2829
/spec/fixtures/litmus_inventory.yaml
30+
.resource_types
31+
.modules
32+
.task_cache.json
33+
.plan_cache.json
34+
.rerun.json
35+
bolt-debug.log

.pdkignore

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,34 @@
1616
/log/
1717
/pkg/
1818
/spec/fixtures/manifests/
19-
/spec/fixtures/modules/
19+
/spec/fixtures/modules/*
2020
/tmp/
2121
/vendor/
22+
/.vendor/
2223
/convert_report.txt
2324
/update_report.txt
2425
.DS_Store
2526
.project
2627
.envrc
2728
/inventory.yaml
2829
/spec/fixtures/litmus_inventory.yaml
29-
/appveyor.yml
30-
/.editorconfig
30+
.resource_types
31+
.modules
32+
.task_cache.json
33+
.plan_cache.json
34+
.rerun.json
35+
bolt-debug.log
3136
/.fixtures.yml
3237
/Gemfile
3338
/.gitattributes
39+
/.github/
3440
/.gitignore
35-
/.gitlab-ci.yml
3641
/.pdkignore
3742
/.puppet-lint.rc
3843
/Rakefile
3944
/rakelib/
4045
/.rspec
41-
/.rubocop.yml
42-
/.travis.yml
46+
/..yml
4347
/.yardopts
4448
/spec/
4549
/.vscode/

.puppet-lint.rc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,14 @@
1+
--fail-on-warnings
12
--relative
3+
--no-80chars-check
4+
--no-140chars-check
5+
--no-class_inherits_from_params_class-check
6+
--no-autoloader_layout-check
7+
--no-documentation-check
8+
--no-single_quote_string_with_variables-check
9+
--no-manifest_whitespace_opening_brace_before-check
10+
--no-manifest_whitespace_opening_brace_after-check
11+
--no-manifest_whitespace_closing_brace_before-check
12+
--no-strict_indent-check
13+
--no-parameter_documentation-check
14+
--ignore-paths=.vendor/**/*.pp,.bundle/**/*.pp,pkg/**/*.pp,spec/**/*.pp,tests/**/*.pp,types/**/*.pp,vendor/**/*.pp

0 commit comments

Comments
 (0)