@@ -2,8 +2,9 @@ name: "PR Testing"
2
2
3
3
on : [pull_request]
4
4
5
+
5
6
env :
6
- HONEYCOMB_WRITEKEY : ${{ secrets.HONEYCOMB_WRITEKEY }}
7
+ HONEYCOMB_WRITEKEY : 7f3c63a70eecc61d635917de46bea4e6
7
8
HONEYCOMB_DATASET : litmus tests
8
9
9
10
jobs :
14
15
matrix : ${{ steps.get-matrix.outputs.matrix }}
15
16
16
17
steps :
18
+
17
19
- name : " Honeycomb: Start recording"
18
20
uses : puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
19
21
with :
25
27
run : |
26
28
echo STEP_ID=setup-environment >> $GITHUB_ENV
27
29
echo STEP_START=$(date +%s) >> $GITHUB_ENV
28
-
29
30
- name : Checkout Source
30
31
uses : actions/checkout@v2
31
32
if : ${{ github.repository_owner == 'puppetlabs' }}
@@ -43,28 +44,31 @@ jobs:
43
44
echo ::group::bundler environment
44
45
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
45
46
echo ::endgroup::
46
-
47
+
47
48
- name : " Honeycomb: Record Setup Environment time"
48
49
if : ${{ github.repository_owner == 'puppetlabs' }}
49
50
run : |
50
51
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
51
52
echo STEP_ID=Setup-Acceptance-Test-Matrix >> $GITHUB_ENV
52
53
echo STEP_START=$(date +%s) >> $GITHUB_ENV
54
+ - name : Run validation steps
55
+ run : |
56
+ bundle exec rake validate
57
+ if : ${{ github.repository_owner == 'puppetlabs' }}
53
58
54
59
- name : Setup Acceptance Test Matrix
55
60
id : get-matrix
56
61
run : |
57
62
if [ '${{ github.repository_owner }}' == 'puppetlabs' ]; then
58
- buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2
63
+ buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2
59
64
else
60
65
echo "::set-output name=matrix::{}"
61
66
fi
62
-
67
+
63
68
- name : " Honeycomb: Record Setup Test Matrix time"
64
69
if : ${{ always() }}
65
70
run : |
66
71
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
67
-
68
72
Acceptance :
69
73
name : " ${{matrix.platforms.label}}, ${{matrix.collection}}"
70
74
needs :
84
88
echo 'platform=${{ matrix.platforms.image }}' >> $BUILDEVENT_FILE
85
89
echo 'collection=${{ matrix.collection }}' >> $BUILDEVENT_FILE
86
90
echo 'label=${{ matrix.platforms.label }}' >> $BUILDEVENT_FILE
87
-
91
+
88
92
- name : " Honeycomb: Start recording"
89
93
uses : puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
90
94
with :
97
101
run : |
98
102
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-1 >> $GITHUB_ENV
99
103
echo STEP_START=$(date +%s) >> $GITHUB_ENV
100
-
101
104
- name : Checkout Source
102
105
uses : actions/checkout@v2
103
106
@@ -112,14 +115,13 @@ jobs:
112
115
echo ::group::bundler environment
113
116
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
114
117
echo ::endgroup::
115
-
118
+
116
119
- name : " Honeycomb: Record Setup Environment time"
117
120
if : ${{ always() }}
118
121
run : |
119
122
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
120
123
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
121
124
echo STEP_START=$(date +%s) >> $GITHUB_ENV
122
-
123
125
- name : Provision test environment
124
126
run : |
125
127
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 +147,7 @@ jobs:
145
147
- name : Install module
146
148
run : |
147
149
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_module' -- bundle exec rake 'litmus:install_module'
148
-
150
+
149
151
- name : " Honeycomb: Record deployment times"
150
152
if : ${{ always() }}
151
153
run : |
@@ -154,18 +156,16 @@ jobs:
154
156
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-3 >> $GITHUB_ENV
155
157
echo STEP_START=$(date +%s) >> $GITHUB_ENV
156
158
echo ::endgroup::
157
-
158
159
- name : Run acceptance tests
159
160
run : |
160
161
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:acceptance:parallel' -- bundle exec rake 'litmus:acceptance:parallel'
161
-
162
+
162
163
- name : " Honeycomb: Record acceptance testing times"
163
164
if : ${{ always() }}
164
165
run : |
165
166
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Run acceptance tests'
166
167
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
167
168
echo STEP_START=$(date +%s) >> $GITHUB_ENV
168
-
169
169
- name : Remove test environment
170
170
if : ${{ always() }}
171
171
continue-on-error : true
@@ -177,7 +177,7 @@ jobs:
177
177
echo
178
178
echo ::endgroup::
179
179
fi
180
-
180
+
181
181
- name : " Honeycomb: Record removal times"
182
182
if : ${{ always() }}
183
183
run : |
0 commit comments