Skip to content

[puppetsync] Support simp-iptables 7.x #67

[puppetsync] Support simp-iptables 7.x

[puppetsync] Support simp-iptables 7.x #67

Workflow file for this run

# Run Puppet checks and test matrix on Pull Requests
# ------------------------------------------------------------------------------
# NOTICE: **This file is maintained with puppetsync**
#
# This file is updated automatically as part of a puppet module baseline.
#
# The next baseline sync will overwrite any local changes to this file!
#
# ==============================================================================
#
# The testing matrix considers ruby/puppet versions supported by SIMP and PE:
# ------------------------------------------------------------------------------
# Release Puppet Ruby EOL
# PE 2019.8 6.22 2.5 2022-12 (LTS)
# PE 2021.Y 7.x 2.7 Quarterly updates
#
# https://puppet.com/docs/pe/latest/component_versions_in_recent_pe_releases.html
# https://puppet.com/misc/puppet-enterprise-lifecycle
# ==============================================================================
#
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows
#
name: PR Tests
on:
pull_request:
types: [opened, reopened, synchronize]
env:
PUPPET_VERSION: '~> 7'
jobs:
puppet-syntax:
name: 'Puppet Syntax'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Install Ruby ${{matrix.puppet.ruby_version}}"
uses: ruby/setup-ruby@v1 # ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
with:
ruby-version: 2.7
bundler-cache: true
- run: "bundle exec rake syntax"
puppet-style:
name: 'Puppet Style'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Install Ruby ${{matrix.puppet.ruby_version}}"
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
- run: "bundle exec rake lint"
- run: "bundle exec rake metadata_lint"
ruby-style:
if: false # TODO Modules will need: rubocop in Gemfile, .rubocop.yml
name: 'Ruby Style (experimental)'
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
- name: "Install Ruby ${{matrix.puppet.ruby_version}}"
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
- run: |
bundle show
bundle exec rake rubocop
file-checks:
name: 'File checks'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 'Install Ruby 2.7'
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
- run: bundle exec rake check:dot_underscore
- run: bundle exec rake check:test_file
releng-checks:
name: 'RELENG checks'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 'Install Ruby ${{matrix.puppet.ruby_version}}'
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
- name: 'Tags and changelogs'
run: |
bundle exec rake pkg:check_version
bundle exec rake pkg:compare_latest_tag[,true]
bundle exec rake pkg:create_tag_changelog
- name: 'Test-build the Puppet module'
run: 'bundle exec pdk build --force'
spec-tests:
name: 'Puppet Spec'
needs: [puppet-syntax]
runs-on: ubuntu-latest
strategy:
matrix:
puppet:
- label: 'Puppet 7.x [SIMP 6.6/PE 2021.7]'
puppet_version: '~> 7.0'
ruby_version: '2.7'
experimental: false
- label: 'Puppet 8.x'
puppet_version: '~> 8.0'
ruby_version: '3.2'
experimental: false
fail-fast: false
env:
PUPPET_VERSION: ${{matrix.puppet.puppet_version}}
steps:
- uses: actions/checkout@v3
- name: 'Install Ruby ${{matrix.puppet.ruby_version}}'
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.puppet.ruby_version}}
bundler-cache: true
- run: 'command -v rpm || if command -v apt-get; then sudo apt-get update; sudo apt-get install -y rpm; fi ||:'
- run: 'bundle exec rake spec'
continue-on-error: ${{matrix.puppet.experimental}}
# dump_contexts:
# name: 'Examine Context contents'
# runs-on: ubuntu-latest
# steps:
# - name: Dump contexts
# env:
# GITHUB_CONTEXT: ${{ toJson(github) }}
# run: echo "$GITHUB_CONTEXT"
#