@@ -5,7 +5,7 @@ on: [pull_request]
55jobs :
66 setup_matrix :
77 name : " Setup Test Matrix"
8- runs-on : ubuntu-20.04
8+ runs-on : ubuntu-latest
99 outputs :
1010 matrix : ${{ steps.build-matrix.outputs.matrix }}
1111
@@ -14,11 +14,11 @@ jobs:
1414 uses : actions/checkout@v4
1515 if : ${{ github.repository_owner == 'puppetlabs' }}
1616
17- - name : Activate Ruby 2.7
17+ - name : Activate Ruby 3.1
1818 uses : ruby/setup-ruby@v1
1919 if : ${{ github.repository_owner == 'puppetlabs' }}
2020 with :
21- ruby-version : " 2.7 "
21+ ruby-version : " 3.1 "
2222 bundler-cache : true
2323
2424 - name : Print bundle environment
@@ -27,31 +27,28 @@ jobs:
2727 echo ::group::bundler environment
2828 bundle env
2929 echo ::endgroup::
30- - name : Curl Forge for PE versions
31- id : curl_forge
32- run : |
33- echo "forge_response=$(curl https://forge.puppet.com/private/versions/pe)" >> $GITHUB_OUTPUT
34- - name : Set LTS release
35- id : lts_release
36- run : |
37- out=$(jq -c '[.[] | select(.lts == true)][0].latest | {"collection": [.]}' <<<'${{ steps.curl_forge.outputs.forge_response }}')
38- echo "lts=$out" >> $GITHUB_OUTPUT
39- - name : Setup Spec Test Matrix
40- id : set-matrix
41- run : |
42- echo "matrix={\"platforms\":[\"rhel-7\",\"rhel-8\",\"rhel-9\"]}" >> $GITHUB_OUTPUT
43- - name : Setup Acceptance Test Matrix
30+
31+ - name : Build Test Matrix
4432 id : build-matrix
4533 run : |
46- out=$(echo '${{ steps.set-matrix.outputs.matrix }}' | jq -c --argjson lts '${{ steps.lts_release.outputs.lts }}' '.collection += $lts.collection')
47- echo "matrix=$out" >> $GITHUB_OUTPUT
34+ bundle exec matrix_from_metadata_v3 \
35+ --provision-exclude docker \
36+ --arch-exclude arm \
37+ --platform-exclude debian \
38+ --platform-exclude redhat-8 \
39+ --platform-exclude sles \
40+ --platform-exclude ubuntu \
41+ --puppet-exclude 7 \
42+ --puppet-exclude 8 \
43+ --pe-include
44+
4845 Integration :
49- name : " ${{matrix.platforms}}, ${{matrix.collection}}"
46+ name : " ${{matrix.platforms.label }}, ${{matrix.collection}}"
5047 needs :
5148 - setup_matrix
5249 if : ${{ needs.setup_matrix.outputs.matrix != '{}' }}
5350
54- runs-on : ubuntu-20.04
51+ runs-on : ubuntu-latest
5552 strategy :
5653 fail-fast : false
5754 matrix : ${{fromJson(needs.setup_matrix.outputs.matrix)}}
@@ -60,10 +57,10 @@ jobs:
6057 - name : Checkout Source
6158 uses : actions/checkout@v4
6259
63- - name : Activate Ruby 2.7
60+ - name : Activate Ruby 3.1
6461 uses : ruby/setup-ruby@v1
6562 with :
66- ruby-version : " 2.7 "
63+ ruby-version : " 3.1 "
6764 bundler-cache : true
6865
6966 - name : Print bundle environment
7875 echo ::endgroup::
7976 - name : Provision test environment
8077 run : |
81- bundle exec bolt --modulepath spec/fixtures/modules plan run splunk_hec::acceptance::provision_machines using='provision_service' image='${{ matrix.platforms }}'
78+ bundle exec bolt --modulepath spec/fixtures/modules plan run splunk_hec::acceptance::provision_machines using='provision_service' image='${{ matrix.platforms.image }}'
8279 echo ::group::=== REQUEST ===
8380 cat request.json || true
8481 echo
0 commit comments