@@ -2,10 +2,6 @@ name: "PR Testing"
2
2
3
3
on : [pull_request]
4
4
5
- env :
6
- HONEYCOMB_WRITEKEY : 7f3c63a70eecc61d635917de46bea4e6
7
- HONEYCOMB_DATASET : litmus tests
8
-
9
5
jobs :
10
6
setup_matrix :
11
7
name : " Setup Test Matrix"
@@ -14,56 +10,25 @@ jobs:
14
10
matrix : ${{ steps.get-matrix.outputs.matrix }}
15
11
16
12
steps :
17
- - name : " Honeycomb: Start recording"
18
- uses : puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
19
- with :
20
- apikey : ${{ env.HONEYCOMB_WRITEKEY }}
21
- dataset : ${{ env.HONEYCOMB_DATASET }}
22
- job-status : ${{ job.status }}
23
-
24
- - name : " Honeycomb: Start first step"
25
- run : |
26
- echo STEP_ID=setup-environment >> $GITHUB_ENV
27
- echo STEP_START=$(date +%s) >> $GITHUB_ENV
28
-
29
13
- name : Checkout Source
30
14
uses : actions/checkout@v2
31
- if : ${{ github.repository_owner == 'puppetlabs' }}
32
15
33
16
- name : Activate Ruby 2.7
34
17
uses : ruby/setup-ruby@v1
35
- if : ${{ github.repository_owner == 'puppetlabs' }}
36
18
with :
37
19
ruby-version : " 2.7"
38
20
bundler-cache : true
39
21
40
22
- name : Print bundle environment
41
- if : ${{ github.repository_owner == 'puppetlabs' }}
42
23
run : |
43
24
echo ::group::bundler environment
44
25
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
45
26
echo ::endgroup::
46
27
47
- - name : " Honeycomb: Record Setup Environment time"
48
- if : ${{ github.repository_owner == 'puppetlabs' }}
49
- run : |
50
- buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
51
- echo STEP_ID=Setup-Acceptance-Test-Matrix >> $GITHUB_ENV
52
- echo STEP_START=$(date +%s) >> $GITHUB_ENV
53
-
54
28
- name : Setup Acceptance Test Matrix
55
29
id : get-matrix
56
30
run : |
57
- if [ '${{ github.repository_owner }}' == 'puppetlabs' ]; then
58
31
buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2
59
- else
60
- echo "::set-output name=matrix::{}"
61
- fi
62
-
63
- - name : " Honeycomb: Record Setup Test Matrix time"
64
- if : ${{ always() }}
65
- run : |
66
- buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
67
32
68
33
Acceptance :
69
34
name : " ${{matrix.platforms.label}}, ${{matrix.collection}}"
85
50
echo 'collection=${{ matrix.collection }}' >> $BUILDEVENT_FILE
86
51
echo 'label=${{ matrix.platforms.label }}' >> $BUILDEVENT_FILE
87
52
88
- - name : " Honeycomb: Start recording"
89
- uses : puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
90
- with :
91
- apikey : ${{ env.HONEYCOMB_WRITEKEY }}
92
- dataset : ${{ env.HONEYCOMB_DATASET }}
93
- job-status : ${{ job.status }}
94
- matrix-key : ${{ matrix.platforms.label }}-${{ matrix.collection }}
95
-
96
- - name : " Honeycomb: start first step"
97
- run : |
98
- echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-1 >> $GITHUB_ENV
99
- echo STEP_START=$(date +%s) >> $GITHUB_ENV
100
-
101
53
- name : Checkout Source
102
54
uses : actions/checkout@v2
103
55
@@ -113,13 +65,6 @@ jobs:
113
65
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
114
66
echo ::endgroup::
115
67
116
- - name : " Honeycomb: Record Setup Environment time"
117
- if : ${{ always() }}
118
- run : |
119
- buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
120
- echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
121
- echo STEP_START=$(date +%s) >> $GITHUB_ENV
122
-
123
68
- name : Provision test environment
124
69
run : |
125
70
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision ${{ matrix.platforms.image }}' -- bundle exec rake 'litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]'
@@ -146,26 +91,10 @@ jobs:
146
91
run : |
147
92
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_module' -- bundle exec rake 'litmus:install_module'
148
93
149
- - name : " Honeycomb: Record deployment times"
150
- if : ${{ always() }}
151
- run : |
152
- echo ::group::honeycomb step
153
- buildevents step $TRACE_ID $STEP_ID $STEP_START 'Deploy test system'
154
- echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-3 >> $GITHUB_ENV
155
- echo STEP_START=$(date +%s) >> $GITHUB_ENV
156
- echo ::endgroup::
157
-
158
94
- name : Run acceptance tests
159
95
run : |
160
96
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:acceptance:parallel' -- bundle exec rake 'litmus:acceptance:parallel'
161
97
162
- - name : " Honeycomb: Record acceptance testing times"
163
- if : ${{ always() }}
164
- run : |
165
- buildevents step $TRACE_ID $STEP_ID $STEP_START 'Run acceptance tests'
166
- echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
167
- echo STEP_START=$(date +%s) >> $GITHUB_ENV
168
-
169
98
- name : Remove test environment
170
99
if : ${{ always() }}
171
100
continue-on-error : true
@@ -177,8 +106,3 @@ jobs:
177
106
echo
178
107
echo ::endgroup::
179
108
fi
180
-
181
- - name : " Honeycomb: Record removal times"
182
- if : ${{ always() }}
183
- run : |
184
- buildevents step $TRACE_ID $STEP_ID $STEP_START 'Remove test environment'
0 commit comments