9 changes: 9 additions & 0 deletions .fixtures-latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
fixtures:
repositories:
stdlib:
repo: 'https://github.com/puppetlabs/puppetlabs-stdlib.git'
nsswitch:
repo: 'https://github.com/trlinkin/puppet-nsswitch.git'
symlinks:
pam: "#{source_dir}"
5 changes: 3 additions & 2 deletions .fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
fixtures:
repositories:
stdlib:
repo: 'https://github.com/puppetlabs/puppetlabs-stdlib.git'
ref: '4.25.0'
ref: 'v8.5.0'
nsswitch:
repo: 'https://github.com/trlinkin/puppet-nsswitch.git'
ref: '2.1.0'
ref: '2.2.0'
symlinks:
pam: "#{source_dir}"
85 changes: 85 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: CI

on:
push:
branches:
- main
- master
pull_request:

jobs:
unit:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.allow_failure }}
strategy:
fail-fast: false
matrix:
include:
- ruby: 2.7
puppet: 7
fixtures: .fixtures.yml
allow_failure: false
- ruby: 2.7
puppet: 7
fixtures: .fixtures-latest.yml
allow_failure: true
env:
BUNDLE_WITHOUT: system_tests:release
PUPPET_GEM_VERSION: "~> ${{ matrix.puppet }}.0"
FACTER_GEM_VERSION: "< 4.0"
FIXTURES_YML: ${{ matrix.fixtures }}
name: Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }} fixtures=${{ matrix.fixtures }})
steps:
- uses: actions/checkout@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
cache-version: 2
bundler: '2.1.0'
- name: Validate
run: bundle exec rake check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint
- name: Run tests
run: bundle exec rake parallel_spec
acceptance:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
set:
- "debian-10"
- "rocky-8"
- "ubuntu-1804"
- "ubuntu-2004"
puppet:
- "puppet7"
env:
BUNDLE_WITHOUT: development:release
BEAKER_debug: true
name:
steps:
- name: Enable IPv6 on docker
run: |
echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
sudo service docker restart
# https://github.com/actions/virtual-environments/issues/181#issuecomment-610874237
- name: apparmor
run: |
set -x
sudo apt-get remove mysql-server --purge
sudo apt-get install apparmor-profiles
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
- uses: actions/checkout@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
cache-version: 2
bundler: '2.1.0'
- name: Run tests
run: bundle exec rake beaker
env:
BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet }}
BEAKER_set: ${{ matrix.set }}
1 change: 1 addition & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
with:
ruby-version: '2.7'
bundler-cache: true
cache-version: 2
bundler: '2.1.0'
- name: Build and Deploy
env:
Expand Down
34 changes: 0 additions & 34 deletions .github/workflows/run-pdk-tests-on-puppet-7.7.yml

This file was deleted.

2 changes: 0 additions & 2 deletions .pdkignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,12 @@
/inventory.yaml
/spec/fixtures/litmus_inventory.yaml
/appveyor.yml
/.editorconfig
/.fixtures.yml
/Gemfile
/.gitattributes
/.gitignore
/.gitlab-ci.yml
/.pdkignore
/.puppet-lint.rc
/Rakefile
/rakelib/
/.rspec
Expand Down
4 changes: 4 additions & 0 deletions .puppet-lint.rc
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
--no-80chars-check
--no-140chars-check
--no-manifest_whitespace_opening_brace_after-check
--relative
--fail_on_warnings
8 changes: 8 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,20 @@ Style/TrailingCommaInArrayLiteral:
Style/SymbolArray:
Description: Using percent style obscures symbolic intent of array's contents.
EnforcedStyle: brackets
Layout/FirstHashElementIndentation:
Enabled: false
Performance/RegexpMatch:
Enabled: false
RSpec/MessageSpies:
EnforcedStyle: receive
RSpec/NamedSubject:
Enabled: false
Style/Documentation:
Exclude:
- lib/puppet/parser/functions/**/*
- spec/**/*
Style/HashEachMethods:
Enabled: false
Style/WordArray:
EnforcedStyle: brackets
Performance/AncestorsInclude:
Expand Down
21 changes: 14 additions & 7 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,23 @@
# See https://github.com/puppetlabs/pdk-templates/blob/main/config_defaults.yml
# for the default values.
---
.github/workflows/ci.yaml:
acceptance_matrix:
set:
- rocky-8
- debian-10
- ubuntu-1804
- ubuntu-2004
puppet:
- puppet7
.github/workflows/release.yaml:
unmanaged: true
spec/spec_helper.rb:
coverage_report: true
minimum_code_coverage_percentage: 100
appveyor.yml:
delete: true

.gitlab-ci.yml:
delete: true

.travis.yml:
delete: true

spec/spec_helper.rb:
coverage_report: true
minimum_code_coverage_percentage: 100

Loading