1
+ ---
2
+ name : Add compiler matrix
3
+ on :
4
+ pull_request :
5
+ paths :
6
+ - .github/workflows/**/*
7
+ - spec/**/*
8
+ - lib/**/*
9
+ - tasks/**/*
10
+ - functions/**/*
11
+ - types/**/*
12
+ - plans/**/*
13
+ - hiera/**/*
14
+ - manifests/**/*
15
+ - templates/**/*
16
+ - files/**/*
17
+ - metadata.json
18
+ - Rakefile
19
+ - Gemfile
20
+ - provision.yaml
21
+ - .rspec
22
+ - .rubocop.yml
23
+ - .puppet-lint.rc
24
+ - .fixtures.yml
25
+ branches : [main]
26
+ workflow_dispatch : {}
27
+ jobs :
28
+ test-add-compiler :
29
+ name : PE ${{ matrix.version }} ${{ matrix.architecture }} on ${{ matrix.image }}
30
+ runs-on : ubuntu-latest
31
+ env :
32
+ BOLT_GEM : true
33
+ BOLT_DISABLE_ANALYTICS : true
34
+ LANG : en_US.UTF-8
35
+ PUPPET_FORGE_TOKEN : ${{ secrets.PUPPET_FORGE_API_TOKEN }}
36
+ BUNDLE_RUBYGEMS___PUPPETCORE__PUPPET__COM : forge-key:${{ secrets.PUPPET_FORGE_API_TOKEN }}
37
+ strategy :
38
+ fail-fast : false
39
+ matrix :
40
+ architecture : [standard, large, extra-large]
41
+ version : [2021.7.9, 2023.8.6, 2025.6.0]
42
+ image : [almalinux-cloud/almalinux-8]
43
+ steps :
44
+ - name : Checkout Source
45
+ uses : actions/checkout@v4
46
+ - name : Activate Ruby 3.1
47
+ uses : ruby/setup-ruby@v1
48
+ with :
49
+ ruby-version : ' 3.1'
50
+ bundler-cache : true
51
+ - name : Print bundle environment
52
+ if : ${{ github.repository_owner == 'puppetlabs' }}
53
+ run : |
54
+ echo ::group::info:bundler
55
+ bundle env
56
+ echo ::endgroup::
57
+ - name : Provision test cluster
58
+ timeout-minutes : 15
59
+ run : |
60
+ echo ::group::prepare
61
+ mkdir -p $HOME/.ssh
62
+ echo 'Host *' > $HOME/.ssh/config
63
+ echo ' ServerAliveInterval 150' >> $HOME/.ssh/config
64
+ echo ' ServerAliveCountMax 2' >> $HOME/.ssh/config
65
+ bundle exec rake spec_prep
66
+ echo ::endgroup::
67
+ echo ::group::provision
68
+ bundle exec bolt plan run peadm_spec::provision_test_cluster \
69
+ --modulepath spec/fixtures/modules \
70
+ provider=provision_service \
71
+ image=${{ matrix.image }} \
72
+ architecture=${{ matrix.architecture }}-with-extra-compiler
73
+ echo ::endgroup::
74
+ echo ::group::info:request
75
+ cat request.json || true; echo
76
+ echo ::endgroup::
77
+ echo ::group::info:inventory
78
+ sed -e 's/password: .*/password: "[redacted]"/' < spec/fixtures/litmus_inventory.yaml || true
79
+ echo ::endgroup::
80
+ - name : Install PE on test cluster
81
+ timeout-minutes : 120
82
+ run : |
83
+ bundle exec bolt plan run peadm_spec::install_test_cluster \
84
+ --inventoryfile spec/fixtures/litmus_inventory.yaml \
85
+ --modulepath spec/fixtures/modules \
86
+ architecture=${{ matrix.architecture }} \
87
+ console_password=${{ secrets.CONSOLE_PASSWORD }} \
88
+ version=${{ matrix.version }}
89
+ - name : Run add_compilers plan
90
+ timeout-minutes : 50
91
+ run : |
92
+ bundle exec bolt plan run peadm_spec::add_compilers -v \
93
+ --inventoryfile spec/fixtures/litmus_inventory.yaml \
94
+ --modulepath spec/fixtures/modules \
95
+ architecture=${{ matrix.architecture }}
96
+ - name : Tear down test cluster
97
+ if : ${{ always() }}
98
+ continue-on-error : true
99
+ run : |-
100
+ if [ -f spec/fixtures/litmus_inventory.yaml ]; then
101
+ echo ::group::tear_down
102
+ bundle exec rake 'litmus:tear_down'
103
+ echo ::endgroup::
104
+ echo ::group::info:request
105
+ cat request.json || true; echo
106
+ echo ::endgroup::
107
+ fi
0 commit comments