@@ -2,7 +2,9 @@ name: "PR Testing"
22
33on : [pull_request]
44
5+
56env :
7+
68 HONEYCOMB_WRITEKEY : 7f3c63a70eecc61d635917de46bea4e6
79 HONEYCOMB_DATASET : litmus tests
810
1416 matrix : ${{ steps.get-matrix.outputs.matrix }}
1517
1618 steps :
19+
1720 - name : " Honeycomb: Start recording"
1821 uses : puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
1922 with :
2528 run : |
2629 echo STEP_ID=setup-environment >> $GITHUB_ENV
2730 echo STEP_START=$(date +%s) >> $GITHUB_ENV
28-
2931 - name : Checkout Source
3032 uses : actions/checkout@v2
3133 if : ${{ github.repository_owner == 'puppetlabs' }}
@@ -43,28 +45,31 @@ jobs:
4345 echo ::group::bundler environment
4446 buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
4547 echo ::endgroup::
46-
48+
4749 - name : " Honeycomb: Record Setup Environment time"
4850 if : ${{ github.repository_owner == 'puppetlabs' }}
4951 run : |
5052 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
5153 echo STEP_ID=Setup-Acceptance-Test-Matrix >> $GITHUB_ENV
5254 echo STEP_START=$(date +%s) >> $GITHUB_ENV
55+ - name : Run validation steps
56+ run : |
57+ bundle exec rake validate
58+ if : ${{ github.repository_owner == 'puppetlabs' }}
5359
5460 - name : Setup Acceptance Test Matrix
5561 id : get-matrix
5662 run : |
5763 if [ '${{ github.repository_owner }}' == 'puppetlabs' ]; then
58- buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2
64+ buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2
5965 else
6066 echo "::set-output name=matrix::{}"
6167 fi
62-
68+
6369 - name : " Honeycomb: Record Setup Test Matrix time"
6470 if : ${{ always() }}
6571 run : |
6672 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
67-
6873 Acceptance :
6974 name : " ${{matrix.platforms.label}}, ${{matrix.collection}}"
7075 needs :
8489 echo 'platform=${{ matrix.platforms.image }}' >> $BUILDEVENT_FILE
8590 echo 'collection=${{ matrix.collection }}' >> $BUILDEVENT_FILE
8691 echo 'label=${{ matrix.platforms.label }}' >> $BUILDEVENT_FILE
87-
92+
8893 - name : " Honeycomb: Start recording"
8994 uses : puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
9095 with :
97102 run : |
98103 echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-1 >> $GITHUB_ENV
99104 echo STEP_START=$(date +%s) >> $GITHUB_ENV
100-
101105 - name : Checkout Source
102106 uses : actions/checkout@v2
103107
@@ -112,14 +116,13 @@ jobs:
112116 echo ::group::bundler environment
113117 buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
114118 echo ::endgroup::
115-
119+
116120 - name : " Honeycomb: Record Setup Environment time"
117121 if : ${{ always() }}
118122 run : |
119123 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
120124 echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
121125 echo STEP_START=$(date +%s) >> $GITHUB_ENV
122-
123126 - name : Provision test environment
124127 run : |
125128 buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision ${{ matrix.platforms.image }}' -- bundle exec rake 'litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]'
@@ -145,7 +148,7 @@ jobs:
145148 - name : Install module
146149 run : |
147150 buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_module' -- bundle exec rake 'litmus:install_module'
148-
151+
149152 - name : " Honeycomb: Record deployment times"
150153 if : ${{ always() }}
151154 run : |
@@ -154,18 +157,16 @@ jobs:
154157 echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-3 >> $GITHUB_ENV
155158 echo STEP_START=$(date +%s) >> $GITHUB_ENV
156159 echo ::endgroup::
157-
158160 - name : Run acceptance tests
159161 run : |
160162 buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:acceptance:parallel' -- bundle exec rake 'litmus:acceptance:parallel'
161-
163+
162164 - name : " Honeycomb: Record acceptance testing times"
163165 if : ${{ always() }}
164166 run : |
165167 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Run acceptance tests'
166168 echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
167169 echo STEP_START=$(date +%s) >> $GITHUB_ENV
168-
169170 - name : Remove test environment
170171 if : ${{ always() }}
171172 continue-on-error : true
@@ -177,7 +178,7 @@ jobs:
177178 echo
178179 echo ::endgroup::
179180 fi
180-
181+
181182 - name : " Honeycomb: Record removal times"
182183 if : ${{ always() }}
183184 run : |
0 commit comments