-
Notifications
You must be signed in to change notification settings - Fork 20
81 lines (76 loc) · 2.58 KB
/
pr_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# 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"
#