Skip to content

Commit 9ad9772

Browse files
committed
(PIE-1595) Testing Matrix
1 parent 7d66010 commit 9ad9772

File tree

3 files changed

+19
-16
lines changed

3 files changed

+19
-16
lines changed

.github/workflows/latest_testing.yml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
name: "Setup Test Matrix"
88
runs-on: ubuntu-20.04
99
outputs:
10-
matrix: ${{ steps.build-matrix.outputs.matrix }}
10+
matrix: ${{ steps.set-matrix.outputs.acc_matrix }}
1111

1212
steps:
1313
- name: Checkout Source
@@ -31,30 +31,34 @@ jobs:
3131
id: curl_forge
3232
run: |
3333
echo "forge_response=$(curl https://forge.puppet.com/private/versions/pe)" >> $GITHUB_OUTPUT
34-
- name: Set latest release
34+
- name: Set PE latest release
3535
id: latest_release
3636
run: |
37-
out=$(jq -c '[.[] | select(.lts == false)][0].latest | {"collection": [.]}' <<<'${{ steps.curl_forge.outputs.forge_response }}')
37+
out=$(jq -c '[.[] | select(.lts == false)][0].latest | {"pe_version": [.]}' <<<'${{ steps.curl_forge.outputs.forge_response }}')
3838
echo "latest=$out" >> $GITHUB_OUTPUT
39-
- name: Setup Spec Test Matrix
40-
id: set-matrix
39+
- name: Build Test Matrix
40+
id: build-matrix
4141
run: |
42-
echo "matrix={\"platforms\":[\"rhel-8\",\"rhel-9\",\"sles-15\",\"ubuntu-2204-lts\"]}" >> $GITHUB_OUTPUT
42+
bundle exec matrix_from_metadata_v3 \
43+
--provision-exclude docker \
44+
--arch-exclude arm \
45+
--platform-exclude debian \
46+
--platform-exclude sles
47+
--platform-exclude ubuntu
4348
- name: Setup Acceptance Test Matrix
44-
id: build-matrix
49+
id: set-matrix
4550
run: |
46-
out=$(echo '${{ steps.set-matrix.outputs.matrix }}' | jq -c --argjson latest '${{ steps.latest_release.outputs.latest }}' '.collection += $latest.collection')
47-
echo "matrix=$out" >> $GITHUB_OUTPUT
51+
out=$(echo '${{ steps.build-matrix.outputs.matrix }}' | jq -c --argjson latest '${{ steps.latest_release.outputs.latest }}' '.collection = $latest.pe_version')
52+
echo "acc_matrix=$out" >> $GITHUB_OUTPUT
4853
Integration:
49-
name: "${{matrix.platforms}}, ${{matrix.collection}}"
54+
name: "${{matrix.platforms.label}}, ${{matrix.collection}}"
5055
needs:
5156
- setup_matrix
52-
if: ${{ needs.setup_matrix.outputs.matrix != '{}' }}
5357

5458
runs-on: ubuntu-20.04
5559
strategy:
5660
fail-fast: false
57-
matrix: ${{fromJson(needs.setup_matrix.outputs.matrix)}}
61+
matrix: ${{ fromJson(needs.setup_matrix.outputs.matrix) }}
5862

5963
steps:
6064
- name: Checkout Source
@@ -78,7 +82,7 @@ jobs:
7882
echo ::endgroup::
7983
- name: Provision test environment
8084
run: |
81-
bundle exec bolt --modulepath spec/fixtures/modules plan run splunk_hec::acceptance::provision_machines using='provision_service' image='${{ matrix.platforms }}'
85+
bundle exec bolt --modulepath spec/fixtures/modules plan run splunk_hec::acceptance::provision_machines using='provision_service' image='${{ matrix.platforms.image }}'
8286
echo ::group::=== REQUEST ===
8387
cat request.json || true
8488
echo

.github/workflows/lts_testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- name: Setup Spec Test Matrix
4040
id: set-matrix
4141
run: |
42-
echo "matrix={\"platforms\":[\"rhel-8\",\"rhel-9\",\"sles-15\",\"ubuntu-2204-lts\"]}" >> $GITHUB_OUTPUT
42+
echo "matrix={\"platforms\":[\"rhel-7\",\"rhel-8\",\"rhel-9\"]}" >> $GITHUB_OUTPUT
4343
- name: Setup Acceptance Test Matrix
4444
id: build-matrix
4545
run: |

.github/workflows/nightly_testing.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ jobs:
3030
- name: Get Test Matrix
3131
id: get-matrix
3232
run: |
33-
bundle exec matrix_from_metadata_v3 --provision-include provision_service --output stdout
3433
bundle exec matrix_from_metadata_v3
3534
- name: Set nightly releases
3635
id: nightly_release
@@ -40,7 +39,7 @@ jobs:
4039
- name: Setup Spec Test Matrix
4140
id: set-matrix
4241
run: |
43-
echo "matrix={\"platforms\":[\"rhel-8\",\"rhel-9\",\"sles-15\",\"ubuntu-2204-lts\"]}" >> $GITHUB_OUTPUT
42+
echo "matrix={\"platforms\":[\"rhel-8\",\"rhel-9\",\"ubuntu-2204-lts\"]}" >> $GITHUB_OUTPUT
4443
- name: Setup Acceptance Test Matrix
4544
id: build-matrix
4645
run: |

0 commit comments

Comments
 (0)