Fix legacy fact usage #159
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run Puppet checks and test matrix on Pull Requests | |
# ------------------------------------------------------------------------------ | |
# The testing matrix considers ruby/puppet versions supported by SIMP and PE: | |
# ------------------------------------------------------------------------------ | |
# Release Puppet Ruby EOL | |
# PE 2019.8 6.22 2.7 2022-12 (LTS) | |
# PE 2021.Y 7.x 2.7 Quarterly updates | |
# | |
# https://puppet.com/docs/pe/2018.1/component_versions_in_recent_pe_releases.html | |
# https://puppet.com/misc/puppet-enterprise-lifecycle | |
# https://puppet.com/docs/pe/2018.1/overview/getting_support_for_pe.html | |
# ============================================================================== | |
# | |
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows | |
# | |
name: PR Tests | |
on: | |
push: | |
branches: | |
# A test branch for seeing if your tests will pass in your personal fork | |
- test_me_github | |
pull_request: | |
types: [opened, reopened, synchronize] | |
env: | |
PUPPET_VERSION: '~> 7' | |
jobs: | |
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@v2 | |
- 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 | |
spec-tests: | |
name: 'Spec' | |
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: true | |
env: | |
PUPPET_VERSION: ${{matrix.puppet.puppet_version}} | |
steps: | |
- uses: actions/checkout@v2 | |
- 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" | |
# |