@@ -5,7 +5,7 @@ on: [pull_request]
5
5
jobs :
6
6
setup_matrix :
7
7
name : " Setup Test Matrix"
8
- runs-on : ubuntu-20.04
8
+ runs-on : ubuntu-latest
9
9
outputs :
10
10
matrix : ${{ steps.build-matrix.outputs.matrix }}
11
11
@@ -14,11 +14,11 @@ jobs:
14
14
uses : actions/checkout@v4
15
15
if : ${{ github.repository_owner == 'puppetlabs' }}
16
16
17
- - name : Activate Ruby 2.7
17
+ - name : Activate Ruby 3.1
18
18
uses : ruby/setup-ruby@v1
19
19
if : ${{ github.repository_owner == 'puppetlabs' }}
20
20
with :
21
- ruby-version : " 2.7 "
21
+ ruby-version : " 3.1 "
22
22
bundler-cache : true
23
23
24
24
- name : Print bundle environment
@@ -27,31 +27,28 @@ jobs:
27
27
echo ::group::bundler environment
28
28
bundle env
29
29
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
44
32
id : build-matrix
45
33
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
+
48
45
Integration :
49
- name : " ${{matrix.platforms}}, ${{matrix.collection}}"
46
+ name : " ${{matrix.platforms.label }}, ${{matrix.collection}}"
50
47
needs :
51
48
- setup_matrix
52
49
if : ${{ needs.setup_matrix.outputs.matrix != '{}' }}
53
50
54
- runs-on : ubuntu-20.04
51
+ runs-on : ubuntu-latest
55
52
strategy :
56
53
fail-fast : false
57
54
matrix : ${{fromJson(needs.setup_matrix.outputs.matrix)}}
@@ -60,10 +57,10 @@ jobs:
60
57
- name : Checkout Source
61
58
uses : actions/checkout@v4
62
59
63
- - name : Activate Ruby 2.7
60
+ - name : Activate Ruby 3.1
64
61
uses : ruby/setup-ruby@v1
65
62
with :
66
- ruby-version : " 2.7 "
63
+ ruby-version : " 3.1 "
67
64
bundler-cache : true
68
65
69
66
- name : Print bundle environment
78
75
echo ::endgroup::
79
76
- name : Provision test environment
80
77
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 }}'
82
79
echo ::group::=== REQUEST ===
83
80
cat request.json || true
84
81
echo
0 commit comments